[mips] Change the definition of macro SHIFT_COUNT_TRUNCATED

Richard Sandiford rdsandiford@googlemail.com
Wed Sep 1 18:19:00 GMT 2010


Mingjie Xing <mingjie.xing@gmail.com> writes:
> 2010/8/31 Richard Sandiford <rdsandiford@googlemail.com>:
>> Would you mind doing a simple check on a "real-life" body of code
>> to see how many times having SHIFT_COUNT_TRUNCATED set to 0 affects
>> optimisation of non-vector code?  Something like the linux kernel
>> would be good.  E.g. see how many linux .o files have different
>> text sections before and after the patch.
>
> Hi Richard, I made a test on linux kernel. There are 2640 .o files
> generated by gcc and 419 files have difference in text sections after
> having SHIFT_COUNT_TRUNCATED set to 0.

Whoa.  That's a fair number.

> The strange thing is that when I also defined
> TARGET_SHIFT_TRUNCATION_MASK, changes still exist for these 419
> files. Seems that TARGET_SHIFT_TRUNCATION_MASK doesn't have any
> effect.

Probably not too surprising to be honest.  T_S_T_M only affects
expand, whereas SHIFT_COUNT_TRUNCATED affects the rtl optimisers.

It's far from ideal, but I suppose we have to go with it.
Can you post the complete patch?

Richard



More information about the Gcc-patches mailing list