[RSForGC] Bring computeLiveOutSeed up to code; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273798 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sanjoy Das 2016-06-26 04:55:30 +00:00
parent 7ed3ae5d6d
commit 4c6d1eea8e

View File

@ -2408,17 +2408,17 @@ static void computeLiveInValues(BasicBlock::reverse_iterator rbegin,
}
static void computeLiveOutSeed(BasicBlock *BB, SetVector<Value *> &LiveTmp) {
for (BasicBlock *Succ : successors(BB)) {
const BasicBlock::iterator E(Succ->getFirstNonPHI());
for (BasicBlock::iterator I = Succ->begin(); I != E; I++) {
PHINode *Phi = cast<PHINode>(&*I);
Value *V = Phi->getIncomingValueForBlock(BB);
for (auto &I : *Succ) {
PHINode *PN = dyn_cast<PHINode>(&I);
if (!PN)
break;
Value *V = PN->getIncomingValueForBlock(BB);
assert(!isUnhandledGCPointerType(V->getType()) &&
"support for FCA unimplemented");
if (isHandledGCPointerType(V->getType()) && !isa<Constant>(V)) {
if (isHandledGCPointerType(V->getType()) && !isa<Constant>(V))
LiveTmp.insert(V);
}
}
}
}