Only check for PHI uses inside the current loop.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 11 Apr 2012 00:00:26 +0000 (00:00 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 11 Apr 2012 00:00:26 +0000 (00:00 +0000)
commit8b560b8c485992dbd62ee31aaff5ac25b5549bd6
tree4f30b79c3b50286326d3795485c596e767921432
parent89cdaf46ec53d06e48be69504f446a6c81340513
Only check for PHI uses inside the current loop.

Hoisting a value that is used by a PHI in the loop will introduce a
copy because the live range is extended to cross the PHI.

The same applies to PHIs in exit blocks.

Also use this opportunity to make HasLoopPHIUse() non-recursive.

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