diff options
author | Serguei Katkov <serguei.katkov@azul.com> | 2018-02-27 06:39:31 +0000 |
---|---|---|
committer | Serguei Katkov <serguei.katkov@azul.com> | 2018-02-27 06:39:31 +0000 |
commit | 1137cde9fe779e8169ba54f334869f5a7f7e5061 (patch) | |
tree | 268a98560fda821f9b7941d9a410a554acac6cb3 /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | 96b01bcfb685a2156488712e6c634303e2c8c41b (diff) | |
download | bcm5719-llvm-1137cde9fe779e8169ba54f334869f5a7f7e5061.tar.gz bcm5719-llvm-1137cde9fe779e8169ba54f334869f5a7f7e5061.zip |
[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.
llvm-svn: 326174
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index f75b55d4bf4..170a3078c26 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -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::createAddRecFromPHI(PHINode *PN) { // 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); |