[PATCH] D43498: [SCEV] Extends the SCEVInitRewriter
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 19 22:54:51 PST 2018
sanjoy requested changes to this revision.
sanjoy added inline comments.
This revision now requires changes to proceed.
================
Comment at: lib/Analysis/ScalarEvolution.cpp:4097
+ static const SCEV *rewrite(const SCEV *S, const Loop *L, ScalarEvolution &SE,
+ bool IgnoreOtherLoops = false) {
+ SCEVInitRewriter Rewriter(L, SE, IgnoreOtherLoops);
----------------
I would factor this a bit differently --
- Don't pipe in `IgnoreOtherLoops` into the `SCEVInitRewriter` object. Instead rename `Valid` to `SeenOtherLoops`.
- Handle the `IgnoreOtherLoops` logic in `SCEVInitRewriter:: rewrite` itself as: `return Rewriter.seenOtherLoops() && !IgnoreOtherLoops ? SE.getCouldNotCompute() : Result;`.
https://reviews.llvm.org/D43498
More information about the llvm-commits
mailing list