Revert r140083 and r140084 until buildbots can be fixed.
authorBill Wendling <isanbard@gmail.com>
Mon, 19 Sep 2011 23:30:41 +0000 (23:30 +0000)
committerBill Wendling <isanbard@gmail.com>
Mon, 19 Sep 2011 23:30:41 +0000 (23:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140094 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/CodeExtractor.cpp
test/Transforms/CodeExtractor/2004-11-12-InvokeExtract.ll

index 8b9768520e07ad0a172615fe6219a7553390e218..126056b844cb5a0a724b840380edb6f935eab664 100644 (file)
@@ -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);
index 0460c19b7d17d7f03f647be4ed0bd6f05205cd37..fc58577f67abf8d8abfb7842ab8dd8ffbfa230aa 100644 (file)
@@ -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(...)