[llvm-commits] [llvm] r101165 - /llvm/trunk/lib/CodeGen/MachineSink.cpp

Chris Lattner clattner at apple.com
Tue Apr 13 17:13:01 PDT 2010


On Apr 13, 2010, at 3:52 PM, Jakob Stoklund Olesen wrote:

>>> The 'a && b' condition creates a critical edge to the else block, but we still
>>> want to sink the computation of x into the block. The else block is dominated by
>>> the parent block, so we are not pushing instructions into new code paths.
>> 
>> Nice, testcase? :)
> 
> Sure, I'll cook one up.
> 
> BTW, do we need a code sinking pass at the IR level?
> 
> Machine sinking is easily intimidated by physical register defines, and it currently cannot move code below if/else diamonds and simple loops.

I'm not opposed to it!  instcombine does some limited stuff, but it might make sense to make it a full on pass if it requires signficant analysis or dom info.

-Chris



More information about the llvm-commits mailing list