Clean up code due to auto-insert constructors

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3665 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2002-09-10 22:38:47 +00:00
parent 9afdb2998b
commit 1d608abbc0
6 changed files with 30 additions and 60 deletions

View File

@@ -196,14 +196,12 @@ bool PromotePass::QueuePhiNode(BasicBlock *BB, unsigned AllocaNo) {
// If the BB already has a phi node added for the i'th alloca then we're done!
if (BBPNs[AllocaNo]) return false;
// Create a PhiNode using the dereferenced type...
// Create a PhiNode using the dereferenced type... and add the phi-node to the
// BasicBlock
PHINode *PN = new PHINode(Allocas[AllocaNo]->getAllocatedType(),
Allocas[AllocaNo]->getName()+".mem2reg");
Allocas[AllocaNo]->getName()+".mem2reg",
BB->begin());
BBPNs[AllocaNo] = PN;
// Add the phi-node to the basic-block
BB->getInstList().push_front(PN);
PhiNodes[AllocaNo].push_back(BB);
return true;
}