1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

The last use in a block that doesn't have successors

(return or unreachable) is a kill.

llvm-svn: 67357
This commit is contained in:
Dan Gohman 2009-03-20 01:28:21 +00:00
parent 681326464d
commit 0d6f464b57

View File

@ -131,6 +131,11 @@ LiveValues::Memo &LiveValues::compute(const Value *V) {
// Note the block in which this use occurs.
M.Used.insert(UseBB);
// If the use block doesn't have successors, the value can be
// considered killed.
if (succ_begin(UseBB) == succ_end(UseBB))
M.Killed.insert(UseBB);
// Observe whether the value is used outside of the loop in which
// it is defined. Switch to an enclosing loop if necessary.
for (; L; L = L->getParentLoop())