[llvm] r326174 - [SCEV] Cleanup SCEVInitRewriter. NFC.
Serguei Katkov via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 26 22:39:31 PST 2018
Author: skatkov
Date: Mon Feb 26 22:39:31 2018
New Revision: 326174
URL: http://llvm.org/viewvc/llvm-project?rev=326174&view=rev
Log:
[SCEV] Cleanup SCEVInitRewriter. NFC.
Set default value for IgnoreOtherLoops of SCEVInitRewriter::rewrite to true
to be consistent with SCEVPostIncRewriter which does not have this parameter
but behaves as it would be true.
This is follow up for rL326067.
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=326174&r1=326173&r2=326174&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Mon Feb 26 22:39:31 2018
@@ -4093,7 +4093,7 @@ namespace {
class SCEVInitRewriter : public SCEVRewriteVisitor<SCEVInitRewriter> {
public:
static const SCEV *rewrite(const SCEV *S, const Loop *L, ScalarEvolution &SE,
- bool IgnoreOtherLoops = false) {
+ bool IgnoreOtherLoops = true) {
SCEVInitRewriter Rewriter(L, SE);
const SCEV *Result = Rewriter.visit(S);
if (Rewriter.hasSeenLoopVariantSCEVUnknown())
@@ -5020,7 +5020,7 @@ const SCEV *ScalarEvolution::createAddRe
// by one iteration:
// PHI(f(0), f({1,+,1})) --> f({0,+,1})
const SCEV *Shifted = SCEVShiftRewriter::rewrite(BEValue, L, *this);
- const SCEV *Start = SCEVInitRewriter::rewrite(Shifted, L, *this);
+ const SCEV *Start = SCEVInitRewriter::rewrite(Shifted, L, *this, false);
if (Shifted != getCouldNotCompute() &&
Start != getCouldNotCompute()) {
const SCEV *StartVal = getSCEV(StartValueV);
More information about the llvm-commits
mailing list