diff options
Diffstat (limited to 'lib/Transforms/Utils/CodeExtractor.cpp')
-rw-r--r-- | lib/Transforms/Utils/CodeExtractor.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/Transforms/Utils/CodeExtractor.cpp b/lib/Transforms/Utils/CodeExtractor.cpp index 8b9768520e..126056b844 100644 --- a/lib/Transforms/Utils/CodeExtractor.cpp +++ b/lib/Transforms/Utils/CodeExtractor.cpp @@ -664,13 +664,7 @@ ExtractCodeRegion(const std::vector<BasicBlock*> &code) { // * Pass in uses as args // 3) Move code region, add call instr to func // - for (std::vector<BasicBlock*>::const_iterator - I = code.begin(), E = code.end(); I != E; ++I) { - BasicBlock *BB = *I; - BlocksToExtract.insert(BB); - if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator())) - BlocksToExtract.insert(II->getUnwindDest()); - } + BlocksToExtract.insert(code.begin(), code.end()); Values inputs, outputs; @@ -794,7 +788,6 @@ Function* llvm::ExtractLoop(DominatorTree &DT, Loop *L, bool AggregateArgs) { /// ExtractBasicBlock - slurp a basic block into a brand new function /// Function* llvm::ExtractBasicBlock(BasicBlock *BB, bool AggregateArgs) { - if (BB->isLandingPad()) return 0; std::vector<BasicBlock*> Blocks; Blocks.push_back(BB); return CodeExtractor(0, AggregateArgs).ExtractCodeRegion(Blocks); |