This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Enhance reload_cse_move2add


On Mon, Jul 12, 2010 at 9:10 AM, Jie Zhang <jie@codesourcery.com> wrote:
> On 07/10/2010 08:06 AM, Bernd Schmidt wrote:
>>
>> On 07/09/2010 06:58 PM, Jie Zhang wrote:
>>>
>>> I just tested idctrn01 on my pentium-m laptop. My patch does not change
>>> the performance of idctrn01 on i386. I did some investigation. It's
>>> because i386 can directly use "symbol_ref + offset" as the address in
>>> load instructions. So there is no optimization opportunity that my patch
>>> can utilize. That's the difference between RISC and CISC.
>>
>> [...]
>>>
>>> I collected the code size data from SPEC2000 on AMD64. My patch does not
>>> change code size for any test whether -O2 or -O3, except
>>>
>>> Code Size
>>> =========
>>> Test ?-O2 ? ? ? ?Before ? ?After ? ?Change
>>> ----------------------------------------------
>>> 172.mgrid ? ? ? ?14962 ? ?14976 ? ? ? ?14
>>>
>>> Code Size
>>> Test ?-O3 ? ? ? ?Before ? ?After ? ?Change
>>> ----------------------------------------------
>>> 171.swim ? ? ? ?19231 ? ?19247 ? ? ? ?16
>>
>> So what kinds of changes are there that would explain a 1.48% drop on
>> 179.art? ?If you can verify that the code is in fact identical, and the
>> performance change is noise, the patch is ok.
>>
> I checked the disassemblies of all SPEC2000 tests. My patch generates
> different code only for 171.swim, 172.mgrid and 173.applu whether with -O2
> or -O3. It seems the noise can be as large as 1.48%.

It can be much worse, depending on your machine configuration, cache,
and whether the SPEC*CPU* test is actually memory-bound (like art,
mcf, ammp, and a few others)...

Ciao!
Steven


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]