[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
This commit is contained in:
Chandler Carruth 2014-03-18 21:58:38 +00:00
parent b4416f58d5
commit ae324439d0
1 changed files with 1 additions and 8 deletions

View File

@ -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");