diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-03-02 02:34:20 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-03-02 02:34:20 +0000 |
commit | 1168f93c2b16b7eb9972d093cbee97372a0d1210 (patch) | |
tree | cbae50f6181ce67daf4877e5c5b43a24a03a6980 /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | df37055017a6e7e4b8bff6e6c4a7c92a2dad9021 (diff) | |
download | bcm5719-llvm-1168f93c2b16b7eb9972d093cbee97372a0d1210.tar.gz bcm5719-llvm-1168f93c2b16b7eb9972d093cbee97372a0d1210.zip |
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).
llvm-svn: 262451
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 5f8db62390d..d5e97a3cd09 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -4577,15 +4577,15 @@ ConstantRange ScalarEvolution::getRangeViaFactoring(const SCEV *Start, // 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; - - ConstantRange TrueRange = getRangeForAffineAR( - getConstant(TrueStart), getConstant(TrueStep), MaxBECount, BitWidth); - ConstantRange FalseRange = getRangeForAffineAR( - getConstant(FalseStart), getConstant(FalseStep), MaxBECount, BitWidth); + 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(TrueStart, TrueStep, MaxBECount, BitWidth); + ConstantRange FalseRange = + getRangeForAffineAR(FalseStart, FalseStep, MaxBECount, BitWidth); return TrueRange.unionWith(FalseRange); } |