diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-30 23:03:37 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-30 23:03:37 +0000 |
commit | b292b8ce708d8d5fa4286f1bc2855d6ac0d0f526 (patch) | |
tree | 4847eb648a3d471bdd4b7653a8f83ad5cb4224bd /llvm/lib/Transforms/Utils/SimplifyCFG.cpp | |
parent | 5ac2f49516d8624d998873dbd322e22f0ee5f358 (diff) | |
download | bcm5719-llvm-b292b8ce708d8d5fa4286f1bc2855d6ac0d0f526.tar.gz bcm5719-llvm-b292b8ce708d8d5fa4286f1bc2855d6ac0d0f526.zip |
Move more code back to 2.5 APIs.
llvm-svn: 77635
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index b0643d60965..0f9493dac26 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -1266,8 +1266,6 @@ static bool FoldCondBranchOnPHI(BranchInst *BI) { /// FoldTwoEntryPHINode - Given a BB that starts with the specified two-entry /// PHI node, see if we can eliminate it. static bool FoldTwoEntryPHINode(PHINode *PN) { - LLVMContext &Context = PN->getParent()->getContext(); - // Ok, this is a two entry PHI node. Check to see if this is a simple "if // statement", which has a very simple dominance structure. Basically, we // are trying to find the condition that is being branched on, which @@ -1305,7 +1303,7 @@ static bool FoldTwoEntryPHINode(PHINode *PN) { if (PN->getIncomingValue(0) != PN) PN->replaceAllUsesWith(PN->getIncomingValue(0)); else - PN->replaceAllUsesWith(Context.getUndef(PN->getType())); + PN->replaceAllUsesWith(UndefValue::get(PN->getType())); } else if (!DominatesMergePoint(PN->getIncomingValue(0), BB, &AggressiveInsts) || !DominatesMergePoint(PN->getIncomingValue(1), BB, |