[PATCH] D43507: [SCEV] Fix isKnownPredicate

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 11 23:04:26 PDT 2018


mkazantsev accepted this revision.
mkazantsev added a comment.

LGTM with comments inlined.



================
Comment at: include/llvm/Analysis/ScalarEvolution.h:843
+  /// first = {0, +, 1)<L2>
+  /// second = {1, +, 1)<L1> + {0, +, 1)<L2>
+  /// We can see that for the first AddRec sub-expression it was replaced with
----------------
Please fix `) --> }`


================
Comment at: lib/Analysis/ScalarEvolution.cpp:8735
+  if (Start == getCouldNotCompute())
+    return { nullptr, nullptr };
+  // Compute post increment SCEV for loop L.
----------------
Better make it optional and return None here.


https://reviews.llvm.org/D43507





More information about the llvm-commits mailing list