From a846585050eaaef63527380eac2ba1e338946c19 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 19 Sep 2011 23:30:41 +0000 Subject: [PATCH] Revert r140083 and r140084 until buildbots can be fixed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140094 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/CodeExtractor.cpp | 9 +-------- .../Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll | 5 +---- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/lib/Transforms/Utils/CodeExtractor.cpp b/lib/Transforms/Utils/CodeExtractor.cpp index 8b9768520e0..126056b844c 100644 --- a/lib/Transforms/Utils/CodeExtractor.cpp +++ b/lib/Transforms/Utils/CodeExtractor.cpp @@ -664,13 +664,7 @@ ExtractCodeRegion(const std::vector &code) { // * Pass in uses as args // 3) Move code region, add call instr to func // - for (std::vector::const_iterator - I = code.begin(), E = code.end(); I != E; ++I) { - BasicBlock *BB = *I; - BlocksToExtract.insert(BB); - if (InvokeInst *II = dyn_cast(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 Blocks; Blocks.push_back(BB); return CodeExtractor(0, AggregateArgs).ExtractCodeRegion(Blocks); diff --git a/test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll b/test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll index 0460c19b7d1..fc58577f67a 100644 --- a/test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll +++ b/test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll @@ -10,9 +10,6 @@ Cont: ; preds = %EB ret i32 %V Unw: ; preds = %EB - %exn = landingpad {i8*, i32} personality i32 (...)* @__gcc_personality_v0 - catch i8* null - resume { i8*, i32 } %exn + unwind } -declare i32 @__gcc_personality_v0(...) -- 2.34.1