Improve ValueAlreadyLiveAtInst with a cheap and dirty, but effective
authorChris Lattner <sabre@nondot.org>
Wed, 26 Nov 2008 03:20:37 +0000 (03:20 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 26 Nov 2008 03:20:37 +0000 (03:20 +0000)
commit896617b776e7b015346160645b19be776cbe3805
tree48add5bc922dc693fe14e2e25a921839efad0619
parentf9ef5b3ff597cd32d9b4b56b1c55f72aa56f91d6
Improve ValueAlreadyLiveAtInst with a cheap and dirty, but effective
heuristic: the value is already live at the new memory operation if
it is used by some other instruction in the memop's block.  This is
cheap and simple to compute (moreso than full liveness).

This improves the new heuristic even more.  For example, it cuts two
out of three new instructions out of 255.vortex:DbmFileInGrpHdr,
which is one of the functions that the heuristic regressed.  This
overall eliminates another 40 instructions from 403.gcc and visibly
reduces register pressure in 255.vortex (though this only actually
ends up saving the 2 instructions from the whole program).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60084 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/CodeGenPrepare.cpp