diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-13 20:58:05 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-13 20:58:05 +0000 |
commit | 542619e6d56d97e40b22b0876f6ca57f61112169 (patch) | |
tree | 79db7a82031449710a7cdb8fa0dbe3fe356bea01 /llvm/lib/Transforms/Utils | |
parent | 74a0ba15d335ee53eccdb091a8d905c0cc2d3055 (diff) | |
download | bcm5719-llvm-542619e6d56d97e40b22b0876f6ca57f61112169.tar.gz bcm5719-llvm-542619e6d56d97e40b22b0876f6ca57f61112169.zip |
Move more functionality over to LLVMContext.
llvm-svn: 75497
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index a898d2df2bb..55e1bf225c2 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -1570,7 +1570,8 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI) { // If we need to invert the condition in the pred block to match, do so now. if (InvertPredCond) { Value *NewCond = - BinaryOperator::CreateNot(PBI->getCondition(), + BinaryOperator::CreateNot(*BI->getParent()->getContext(), + PBI->getCondition(), PBI->getCondition()->getName()+".not", PBI); PBI->setCondition(NewCond); BasicBlock *OldTrue = PBI->getSuccessor(0); @@ -1726,12 +1727,12 @@ static bool SimplifyCondBranchToCondBranch(BranchInst *PBI, BranchInst *BI) { // Make sure we get to CommonDest on True&True directions. Value *PBICond = PBI->getCondition(); if (PBIOp) - PBICond = BinaryOperator::CreateNot(PBICond, + PBICond = BinaryOperator::CreateNot(*Context, PBICond, PBICond->getName()+".not", PBI); Value *BICond = BI->getCondition(); if (BIOp) - BICond = BinaryOperator::CreateNot(BICond, + BICond = BinaryOperator::CreateNot(*Context, BICond, BICond->getName()+".not", PBI); // Merge the conditions. |