diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-11-06 04:27:31 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-11-06 04:27:31 +0000 |
| commit | 46b5c642b9baca354ba18f3dbb37f4020848d0f3 (patch) | |
| tree | 68fd5d94ef426e6da66de84d531927c89fa220fb /llvm/lib/Analysis/ScalarEvolution.cpp | |
| parent | 421a5c9651232f5553658f57603ce8e61ef28748 (diff) | |
| download | bcm5719-llvm-46b5c642b9baca354ba18f3dbb37f4020848d0f3.tar.gz bcm5719-llvm-46b5c642b9baca354ba18f3dbb37f4020848d0f3.zip | |
remove a bunch of extraneous LLVMContext arguments
from various APIs, addressing PR5325.
llvm-svn: 86231
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
| -rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 3e87ca22be3..8ead14e9a87 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -3816,7 +3816,6 @@ static Constant *EvaluateExpression(Value *V, Constant *PHIVal) { if (Constant *C = dyn_cast<Constant>(V)) return C; if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) return GV; Instruction *I = cast<Instruction>(V); - LLVMContext &Context = I->getParent()->getContext(); std::vector<Constant*> Operands; Operands.resize(I->getNumOperands()); @@ -3828,12 +3827,10 @@ static Constant *EvaluateExpression(Value *V, Constant *PHIVal) { if (const CmpInst *CI = dyn_cast<CmpInst>(I)) return ConstantFoldCompareInstOperands(CI->getPredicate(), - &Operands[0], Operands.size(), - Context); + &Operands[0], Operands.size()); else return ConstantFoldInstOperands(I->getOpcode(), I->getType(), - &Operands[0], Operands.size(), - Context); + &Operands[0], Operands.size()); } /// getConstantEvolutionLoopExitValue - If we know that the specified Phi is @@ -4040,12 +4037,10 @@ const SCEV *ScalarEvolution::computeSCEVAtScope(const SCEV *V, const Loop *L) { Constant *C; if (const CmpInst *CI = dyn_cast<CmpInst>(I)) C = ConstantFoldCompareInstOperands(CI->getPredicate(), - &Operands[0], Operands.size(), - getContext()); + &Operands[0], Operands.size()); else C = ConstantFoldInstOperands(I->getOpcode(), I->getType(), - &Operands[0], Operands.size(), - getContext()); + &Operands[0], Operands.size()); return getSCEV(C); } } |

