diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-27 20:59:43 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-27 20:59:43 +0000 |
commit | 6f83c9c6ef0e7f79825a0a8f22941815e4b684c7 (patch) | |
tree | a6b206cab778933e7ebb35788fc3b41e47b57c7c /lib/Transforms/Scalar/LoopStrengthReduce.cpp | |
parent | 9a31254d0e51cfe08bc0e0c63ea04780cbc776f4 (diff) |
Move ConstantFP construction back to the 2.5-ish API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77247 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 82ca81acc4..9829c8d7df 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -2177,8 +2177,6 @@ void LoopStrengthReduce::OptimizeShadowIV(Loop *L) { if (isa<SCEVCouldNotCompute>(BackedgeTakenCount)) return; - LLVMContext &Context = L->getHeader()->getContext(); - for (unsigned Stride = 0, e = IU->StrideOrder.size(); Stride != e; ++Stride) { std::map<const SCEV *, IVUsersOfOneStride *>::iterator SI = @@ -2240,7 +2238,7 @@ void LoopStrengthReduce::OptimizeShadowIV(Loop *L) { ConstantInt *Init = dyn_cast<ConstantInt>(PH->getIncomingValue(Entry)); if (!Init) continue; - Constant *NewInit = Context.getConstantFP(DestTy, Init->getZExtValue()); + Constant *NewInit = ConstantFP::get(DestTy, Init->getZExtValue()); BinaryOperator *Incr = dyn_cast<BinaryOperator>(PH->getIncomingValue(Latch)); @@ -2264,7 +2262,7 @@ void LoopStrengthReduce::OptimizeShadowIV(Loop *L) { PHINode *NewPH = PHINode::Create(DestTy, "IV.S.", PH); /* create new increment. '++d' in above example. */ - Constant *CFP = Context.getConstantFP(DestTy, C->getZExtValue()); + Constant *CFP = ConstantFP::get(DestTy, C->getZExtValue()); BinaryOperator *NewIncr = BinaryOperator::Create(Incr->getOpcode() == Instruction::Add ? Instruction::FAdd : Instruction::FSub, |