GCC 3.5 Status (2004-08-29)

Mark Mitchell mark@codesourcery.com
Mon Aug 30 15:10:00 GMT 2004


Daniel Berlin wrote:

>
>
> On Mon, 30 Aug 2004, Mark Mitchell wrote:
>
>> Steven Bosscher wrote:
>>
>>> On Monday 30 August 2004 03:12, Mark Mitchell wrote:
>>>
>>>> Perhaps you can wait until SRA runs, and then just DTRT for objects 
>>>> that
>>>> get SRA'd.
>>>>
>>>
>>> Alias structured are never SRA'd.
>>>
>> Certainly, in Dan's example:
>>
>> x = a.f
>> c = a.e
>> a.e = 5
>> c = a.f
>>
>> it should be possible to SRA "a" without any alias information at all,
>
>
> Yes, you could, if you effectively ignored what the SSA infrastructure 
> tells you (that they do overlap), and try to figure it out on your own.
>
> This seems like a bad idea, IMHO.

In the abstract, yes.

However, sometimes it's appropriate to do something expedient to get 
from point A to point B.  As an example, the load-hoisting/store-sinking 
patch for the RTL optimizers was hardly a thing of beauty -- but did 
make a fair amount of code go quicker and wasn't responsible for very 
many bugs.  I'm glad it was in GCC -- and I'm glad that now we have real 
optimizers and can throw that stuff out!

I'm not arguing that we ought to do what I suggested; only that it's a 
possible alternative.  And that we should consider localized solutions 
(in this case, hacks to SRA, say) rather than just global solutions 
(change all representations for V_USE, adjust passes to understand 
that).  Sometimes one approach is better, sometimes the other, but both 
should be in play, especially if there is a big time/risk tradeoff.  (I 
have no idea how hard it would be to make SRA smarter; maybe there is no 
time win, in which case that suggestion is much weaker.)

-- 
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com



More information about the Gcc mailing list