diff options
author | Dan Gohman <gohman@apple.com> | 2009-08-12 16:23:25 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-08-12 16:23:25 +0000 |
commit | 4ae5126d041768ab9665cf2f11c024becd76c41f (patch) | |
tree | 81a19ddebcd4474dbc5c3e0f1e82935dd5831eb5 /lib/Transforms/Utils | |
parent | 186a636b680d37fd6b06b31436cb657983d6b481 (diff) |
Remove a bunch more now-unnecessary Context arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78809 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils')
-rw-r--r-- | lib/Transforms/Utils/AddrModeMatcher.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 10 |
2 files changed, 5 insertions, 8 deletions
diff --git a/lib/Transforms/Utils/AddrModeMatcher.cpp b/lib/Transforms/Utils/AddrModeMatcher.cpp index bcfa2303a8..c47e0ff50b 100644 --- a/lib/Transforms/Utils/AddrModeMatcher.cpp +++ b/lib/Transforms/Utils/AddrModeMatcher.cpp @@ -97,8 +97,7 @@ bool AddressingModeMatcher::MatchScaledValue(Value *ScaleReg, int64_t Scale, // X*Scale + C*Scale to addr mode. ConstantInt *CI = 0; Value *AddLHS = 0; if (isa<Instruction>(ScaleReg) && // not a constant expr. - match(ScaleReg, m_Add(m_Value(AddLHS), m_ConstantInt(CI)), - MemoryInst->getContext())) { + match(ScaleReg, m_Add(m_Value(AddLHS), m_ConstantInt(CI)))) { TestAddrMode.ScaledReg = AddLHS; TestAddrMode.BaseOffs += CI->getSExtValue()*TestAddrMode.Scale; diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index 0f9493dac2..d6d8f28e7e 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -1558,8 +1558,7 @@ 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(BI->getParent()->getContext(), - PBI->getCondition(), + BinaryOperator::CreateNot(PBI->getCondition(), PBI->getCondition()->getName()+".not", PBI); PBI->setCondition(NewCond); BasicBlock *OldTrue = PBI->getSuccessor(0); @@ -1598,8 +1597,7 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI) { static bool SimplifyCondBranchToCondBranch(BranchInst *PBI, BranchInst *BI) { assert(PBI->isConditional() && BI->isConditional()); BasicBlock *BB = BI->getParent(); - LLVMContext &Context = BB->getContext(); - + // If this block ends with a branch instruction, and if there is a // predecessor that ends on a branch of the same condition, make // this conditional branch redundant. @@ -1715,12 +1713,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(Context, PBICond, + PBICond = BinaryOperator::CreateNot(PBICond, PBICond->getName()+".not", PBI); Value *BICond = BI->getCondition(); if (BIOp) - BICond = BinaryOperator::CreateNot(Context, BICond, + BICond = BinaryOperator::CreateNot(BICond, BICond->getName()+".not", PBI); // Merge the conditions. |