[PATCH] D87832: [IndVars] Remove monotonic checks with unknown exit count

Artur Pilipenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 22 17:00:32 PDT 2020


apilipenko added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:9248
+    ICmpInst::Predicate Pred, const SCEV *LHS, const SCEV *RHS, const Loop *L,
+    const Instruction *Context, const SCEV *MaxIter,
+    ICmpInst::Predicate &InvariantPred, const SCEV *&InvariantLHS,
----------------
Do we actually need to pass MaxIter? We already have the loop, we can check the max iterations for the loop inside of this function. 

If we make this interface change, isLoopInvariantPredicateAtDuringFirstIterations interface becomes very similar to isLoopInvariantPredicate. At that point we can add context to isLoopInvariantPredicate and implement the proposed logic in isLoopInvariantPredicate.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87832/new/

https://reviews.llvm.org/D87832



More information about the llvm-commits mailing list