[PATCH] D17632: [LoopUnrollAnalyzer] Check that we're using SCEV for the same loop we're simulating.

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 25 18:17:28 PST 2016


sanjoy added a comment.

Minor drop by comments inline


================
Comment at: lib/Analysis/LoopUnrollAnalyzer.cpp:40
@@ -39,3 +39,3 @@
   auto *AR = dyn_cast<SCEVAddRecExpr>(S);
   if (!AR)
     return false;
----------------
Nit: why not change this to `if (!AR || AR->getLoop() != L)`?

================
Comment at: unittests/Analysis/UnrollAnalyzer.cpp:132
@@ +131,3 @@
+      "define void @foo() {\n"
+      "entry:\n"
+      "  br label %outer.loop\n"
----------------
Do we actually need the trailing newlines?  I don't think the parser actually cares, and they're somewhat distracting.


http://reviews.llvm.org/D17632





More information about the llvm-commits mailing list