diff options
author | Manuel Jacob <me@manueljacob.de> | 2016-01-21 06:33:22 +0000 |
---|---|---|
committer | Manuel Jacob <me@manueljacob.de> | 2016-01-21 06:33:22 +0000 |
commit | e902459c4b3e5dbe62ff31a52c2203cb4e89f338 (patch) | |
tree | 928864bcaac664d01cc092a8dff0dc8653e65911 /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | 925d029461972b44eec4a69a61014b7646a52f3b (diff) | |
download | bcm5719-llvm-e902459c4b3e5dbe62ff31a52c2203cb4e89f338.tar.gz bcm5719-llvm-e902459c4b3e5dbe62ff31a52c2203cb4e89f338.zip |
Change ConstantFoldInstOperands to take Instruction instead of opcode and type. NFC.
Summary:
The previous form, taking opcode and type, is moved to an internal
helper and the new form, taking an instruction, is a wrapper around this
helper.
Although this is a slight cleanup on its own, the main motivation is to
refactor the constant folding API to ease migration to opaque pointers.
This will be follow-up work.
Reviewers: eddyb
Subscribers: dblaikie, llvm-commits
Differential Revision: http://reviews.llvm.org/D16383
llvm-svn: 258391
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index ed640acfda5..dc580dfdf26 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -5917,8 +5917,7 @@ static Constant *EvaluateExpression(Value *V, const Loop *L, if (!LI->isVolatile()) return ConstantFoldLoadFromConstPtr(Operands[0], DL); } - return ConstantFoldInstOperands(I->getOpcode(), I->getType(), Operands, DL, - TLI); + return ConstantFoldInstOperands(I, Operands, DL, TLI); } @@ -6306,8 +6305,7 @@ const SCEV *ScalarEvolution::computeSCEVAtScope(const SCEV *V, const Loop *L) { if (!LI->isVolatile()) C = ConstantFoldLoadFromConstPtr(Operands[0], DL); } else - C = ConstantFoldInstOperands(I->getOpcode(), I->getType(), Operands, - DL, &TLI); + C = ConstantFoldInstOperands(I, Operands, DL, &TLI); if (!C) return V; return getSCEV(C); } |