|optimization and register allocation sastry@GODEL.MIEL.MOT.COM (1995-02-24)|
|Re: optimization and register allocation davidm@Rational.COM (1995-02-28)|
|Re: optimization and register allocation firstname.lastname@example.org (1995-03-04)|
|Re: optimization and register allocation email@example.com (1995-03-06)|
|From:||sastry@GODEL.MIEL.MOT.COM (Venkateshwara Sastry)|
|Date:||Fri, 24 Feb 1995 07:58:06 GMT|
Consider the following piece of code :
y = (-a) +f2 ;
... many uses of a here.
An optimizing compiler probably find that (-a) is loop invariant and
replace the code by
.... many uses of a here.
Now consider the case when GRA doesn't allocates register to t but
allocates a register to a. As a result code generator has to pick t
every time from memory which might be costiler than just negating a.
So we have essentially slowed down the genarated code. On the other
hand, had the GRA allocated a register to t it would have really
improved the generated code.
How can one determine whether to perform such optimizations( whose
behavior depend on register allocator) or not?
Return to the
Search the comp.compilers archives again.