On 17 Jun 1999 12:07:21 +0200, Jan Vroonhof <vroonhof(a)math.ethz.ch> said:
Yes, but which of them do this optimization?
IBM's XLC compiler provides the following options for how much it's
allowed to use:
alias=<option>
Specifies the aliasing assertion to be applied to
your compilation unit.
The available options are:
typ Pointers to different types are never aliased.
allp Pointers are never aliased.
addr Variables are disjoint from pointers
unless their address is taken.
ansi Pointers can only point to an object of the
same type. Require -O option.
The compiler guys at IBM Toronto are known to be maniacs, however.
At -O4, it's even able to do inlining of function calls *if the called
function is in a different source file*. Yow.
For what it's worth, I did light testing of a 21.2 built with "-O3
-qansialias"
(which basically means 'be as agressive as you want, 'qstrict' is off
so you can migrate and permute code, ansialias is on, so intuit all you
want to regarding aliasing fuckage).
It seems to work fine under AIX 4.3.2 and xlc 3.6.6. The following
caveats apply:
a) -O3 under the xlc 3.1.4 compiler is probably Heap Bad Juju.
b) The IBM compiler is guaranteed not to do optimizations that
result in an aliasing screw at -O2. You have to specify -O3.
c) I seem to remember that the ansialias problems resulted in an
xemacs that didn't even live as far as the splash screen, so whatever
it was, it seems to have gone away (but I can't tell whether it's
because of compiler fixes or XEmacs fixes ;)
At least for IBM, if the default optimizer level is -O2, it will
be Just Fine. I'll submit a patch for the Problems file about this,
as the stuff I originally put in there needs updating anyhow.
/Valdis