Unreviewed patches (since February/March)

Daniel Berlin dberlin@dberlin.org
Wed Sep 11 21:20:00 GMT 2002


> 
> In fact, you could write an optimization that copied the rest of the 
> function into two arms of an if (p) block, and in each one, you'd be able 
> to optimize appropriately.
Even stranger, i just noticed (while looking for another website so i 
could make sure i quoted 6.7.3.1 properly) has written a language 
extension to C that lets you do this type of thing explicitly.

"Alias-free parameters in C for Better Reasoning and Optimization" by 
Medhat G. Assaad and Gary T. Leavens.

"... This is done by having multiple bodies for each procedure, up to one 
for each aliasing pattern. Procedure calls are automatically dispatched to the 
body that matches the run-time aliasing pattern ..."


The funniest part has to be "We chose GCC because we needed a 
compiler that we had source access to, and that does aggressive 
optimization using aliasing information."
We do?
(This was 2.95 that they modified, even).

--Dan



More information about the Gcc-patches mailing list