[llvm] r204187 - [LV] The actual change I intended to commit in r204148. Sorry for the

Chandler Carruth chandlerc at gmail.com
Tue Mar 18 14:58:38 PDT 2014

Author: chandlerc
Date: Tue Mar 18 16:58:38 2014
New Revision: 204187

URL: http://llvm.org/viewvc/llvm-project?rev=204187&view=rev
[LV] The actual change I intended to commit in r204148. Sorry for the

Original commit log:
Replace some dead code with an assert. When I first ported this pass
from a loop pass to a function pass I did so in the naive, recursive
way. It doesn't actually work, we need a worklist instead. When
I switched to the worklist I didn't delete the naive recursion. That
recursion was also buggy because it was dead and never really exercised.


Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=204187&r1=204186&r2=204187&view=diff
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Tue Mar 18 16:58:38 2014
@@ -1064,14 +1064,7 @@ struct LoopVectorize : public FunctionPa
   bool processLoop(Loop *L) {
-    // We only handle inner loops, so if there are children just recurse.
-    if (!L->empty()) {
-      bool Changed = false;
-      for (Loop *InnerL : *L)
-        Changed |= processLoop(InnerL);
-      return Changed;
-    }
+    assert(L->empty() && "Only process inner loops.");
     DEBUG(dbgs() << "LV: Checking a loop in \"" <<
           L->getHeader()->getParent()->getName() << "\"\n");

More information about the llvm-commits mailing list