Fri Dec 5 09:53:00 GMT 2003
> I don't think there's an "invariant test motion" optimization, which
> would consolidate the conditional code block bodies for you.
> That could be useful in some cases.
> Especially if your test for swap/don't swap was in a macro, and you
> really didn't have an easy means at the code level to pull the invariant
> test condition out of the macro -- so consolidating the conditional
> bodies by hand would be even more onerous.
Yes, this is the case in my application (inline functions instead of
How hard would it be for the compiler to do that optimization?
Intuitively, it looks obvious, at least not any more complicated than cse,
but then I really don't know anything.
Helge Bahmann <email@example.com> /| \__
The past: Smart users in front of dumb terminals /_|____\
_/\ | __)
$ ./configure \\ \|__/__|
checking whether build environment is sane... yes \\/___/ |
checking for AIX... no (we already did this) |
More information about the Gcc-help