From 633eb08d3163944e4e9d67a9c9faf05c9a3ef7f1 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Tue, 18 Mar 2014 21:58:38 +0000 Subject: [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204187 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Vectorize/LoopVectorize.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'lib/Transforms/Vectorize') diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp index dd8d5fce8d..1f02bf6cbe 100644 --- a/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/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"); -- cgit v1.2.3