[llvm-commits] [llvm] r44687 - in /llvm/trunk: include/llvm/CodeGen/Passes.h lib/CodeGen/LLVMTargetMachine.cpp lib/CodeGen/MachineLICM.cpp lib/Target/PowerPC/PPCInstrInfo.td

Bill Wendling isanbard at gmail.com
Mon Dec 10 16:30:57 PST 2007


On Dec 10, 2007 3:44 PM, Evan Cheng <evan.cheng at apple.com> wrote:
> On Dec 10, 2007, at 1:23 PM, Bill Wendling wrote:
> > On Dec 10, 2007 11:36 AM, Evan Cheng <evan.cheng at apple.com> wrote:
> >> I don't think lifting loop invariant from inner loop all the way out
> >> of outer-most loop is a good idea. That will increase register
> >> pressure in basic blocks where it is not used.
> >>
> > This is going to happen with the current pass, though. Each loop is
> > going to see the hoisted instructions from the previous iteration and
> > try to re-hoist them. Is there some heuristic we should apply to
> > prevent it from hoisting instructions too far?
> >
>
> I am not sure. :-)
>
> For innermost loops, hoisting invariants out into the preheader always
> make sense. Intuitively, hoisting invariants from inner loops out of
> the outermost loop only makes sense when all (or a lot, whatever that
> means :-) of the inner loops use it. Or at least the first inner loop
> use it.
>
> What does the LLVM level LICM do?
>
It does the same thing that Machine LICM does...tries to hoist things
as far as possible.

-bw



More information about the llvm-commits mailing list