summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-03-18 21:58:38 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-03-18 21:58:38 +0000
commitae324439d03bb9b4dc5932fa37f3a7224309449d (patch)
treec2e7275503588b22ef015a911a780ff11ce55676
parentb4416f58d54bec73aeefa3122fb195ab1dd73517 (diff)
downloadbcm5719-llvm-ae324439d03bb9b4dc5932fa37f3a7224309449d.tar.gz
bcm5719-llvm-ae324439d03bb9b4dc5932fa37f3a7224309449d.zip
[LV] The actual change I intended to commit in r204148. Sorry for the
noise. 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. llvm-svn: 204187
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index dd8d5fce8d4..1f02bf6cbe9 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -1064,14 +1064,7 @@ struct LoopVectorize : public FunctionPass {
}
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");
OpenPOWER on IntegriCloud