[PATCH] D17201: [SCEV] Introduce a guarded backedge taken count and use it in LAA and LV

silviu.baranga@arm.com via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 31 05:59:06 PDT 2016


sbaranga marked 4 inline comments as done.

================
Comment at: include/llvm/Analysis/ScalarEvolution.h:655
@@ +654,3 @@
+      /// Iterators
+      ExitNotTakenInfoIterator begin() const {
+        return ExitNotTakenInfoIterator(this, 0);
----------------
Makes sense to me.

================
Comment at: include/llvm/Analysis/ScalarEvolution.h:666
@@ +665,3 @@
+      /// The predicate associated with the ExitNotTakenInfo struct.
+      SCEVUnionPredicate Pred;
+
----------------
Thanks! Greatly appreciated :).

================
Comment at: lib/Analysis/ScalarEvolutionExpander.cpp:2007-2009
@@ -2006,3 +2006,5 @@
 
-  const SCEV *ExitCount = SE.getBackedgeTakenCount(AR->getLoop());
+  SCEVUnionPredicate Pred;
+  const SCEV *ExitCount =
+      SE.getPredicatedBackedgeTakenCount(AR->getLoop(), Pred);
   const SCEV *Step = AR->getStepRecurrence(SE);
----------------
I've re-audited the

Please see the updated definition of the SCEVWrapPredicate which should make this point clear.

Regarding the code restructuring: I don't see a good solution for this either.


http://reviews.llvm.org/D17201





More information about the llvm-commits mailing list