summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-03-18 21:51:46 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-03-18 21:51:46 +0000
commitf73079ca891cd7b76578851b0f1921616680dfaf (patch)
tree36388a40fe2293812504809ebfef3f9358e969f9 /llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
parent11f806740d9524bed91a9f1a0c4a5b279e85981d (diff)
downloadbcm5719-llvm-f73079ca891cd7b76578851b0f1921616680dfaf.tar.gz
bcm5719-llvm-f73079ca891cd7b76578851b0f1921616680dfaf.zip
[LV] 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: 204184
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/LoopVectorize.cpp')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 435c0054d0d..dd8d5fce8d4 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -1067,8 +1067,8 @@ struct LoopVectorize : public FunctionPass {
// We only handle inner loops, so if there are children just recurse.
if (!L->empty()) {
bool Changed = false;
- for (Loop::iterator I = L->begin(), E = L->begin(); I != E; ++I)
- Changed |= processLoop(*I);
+ for (Loop *InnerL : *L)
+ Changed |= processLoop(InnerL);
return Changed;
}
OpenPOWER on IntegriCloud