Re: conditionals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Eljay,

> 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
macros, though).

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.

Thanks
-- 
Helge Bahmann <hcb@xxxxxxxxxxxxxxx>                     /| \__
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)            |



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux