Teach MachineSinking to handle easy critical edges.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 13 Apr 2010 19:06:14 +0000 (19:06 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 13 Apr 2010 19:06:14 +0000 (19:06 +0000)
commit8d17160e2cf9a1645b4b06b0cd575aef6195b108
tree3e91c27ba1458073bca280e9d47f3d1a938414a4
parent005de5ef33daf743a919c8ef5cd17c354df50c85
Teach MachineSinking to handle easy critical edges.

Sometimes it is desirable to sink instructions along a critical edge:

x = ...
if (a && b) ...
else use(x);

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101165 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineSink.cpp