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: [IRA] patch for inter-procedural register allocation and save area stack slot sharing


On 1/20/07, Vladimir N. Makarov <vmakarov@redhat.com> wrote:
Jan Hubicka wrote:

>>The patch
>>
>>o implements a simple form of inter-procedural register allocation (it
>> looks what call used registers were not used through the calls and
>> don't save and restore them through the calls.  IRA will have
>> cost of usage such registers different from the rest of
>> called used hard registers)
>>
>>o implements sharing slots in save area (used for saving call used
>> hard register through calls).
>>
>>
>
>Vladimir,
>actually this feature is something I wanted to try for a while, but on
>the top of our current register allocation infrastructure I never found
>pleasant way to implement it.
>I wonder if you've run some benchmarks and what kind of benefits did you
>get?
>
>
>
I have no accurate data now.  As I remember there are improvements on
some SPEC2000 tests (in overall I would say 0.5% for x86_64).  The code
size is always smaller.

The algoritm is simple.  It has tendency to use call used registers in
functions on lower level which might be bad for higher level functions.
It is interesting that there is an optimal non-expontential algorithm of
interprocedural register allocation
http://citeseer.ist.psu.edu/kurlander96minimum.html

There are nowadays *linear time* optimal allocation algorithms for SSA form programs, but they don't model spill cost very well.

As for IPRA,  RA is one of the strange things that gets simpler in an
IPA world, because you are generally *less* constrained than you are
at the local level.


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