[llvm] r262451 - Perturb code in an attempt to appease MSVC
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 1 18:34:20 PST 2016
Author: sanjoy
Date: Tue Mar 1 20:34:20 2016
New Revision: 262451
URL: http://llvm.org/viewvc/llvm-project?rev=262451&view=rev
Log:
Perturb code in an attempt to appease MSVC
For some reason MSVC seems to think I'm calling getConstant() from a
static context. Try to avoid this issue by explicitly specifying
'this->' (though I'm not confident that this will actually work).
Modified:
llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=262451&r1=262450&r2=262451&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Tue Mar 1 20:34:20 2016
@@ -4577,15 +4577,15 @@ ConstantRange ScalarEvolution::getRangeV
// from deep in the call stack, and calling getSCEV (on a sext instruction,
// say) can end up caching a suboptimal value.
- APInt TrueStart = *StartPattern.TrueValue + Offset;
- APInt TrueStep = *StepPattern.TrueValue;
- APInt FalseStart = *StartPattern.FalseValue + Offset;
- APInt FalseStep = *StepPattern.FalseValue;
+ const SCEV *TrueStart = this->getConstant(*StartPattern.TrueValue + Offset);
+ const SCEV *TrueStep = this->getConstant(*StepPattern.TrueValue);
+ const SCEV *FalseStart = this->getConstant(*StartPattern.FalseValue + Offset);
+ const SCEV *FalseStep = this->getConstant(*StepPattern.FalseValue);
- ConstantRange TrueRange = getRangeForAffineAR(
- getConstant(TrueStart), getConstant(TrueStep), MaxBECount, BitWidth);
- ConstantRange FalseRange = getRangeForAffineAR(
- getConstant(FalseStart), getConstant(FalseStep), MaxBECount, BitWidth);
+ ConstantRange TrueRange =
+ getRangeForAffineAR(TrueStart, TrueStep, MaxBECount, BitWidth);
+ ConstantRange FalseRange =
+ getRangeForAffineAR(FalseStart, FalseStep, MaxBECount, BitWidth);
return TrueRange.unionWith(FalseRange);
}
More information about the llvm-commits
mailing list