diff options
| author | Reid Kleckner <rnk@google.com> | 2015-10-09 23:34:53 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2015-10-09 23:34:53 +0000 |
| commit | 14e773500e036de57ed0ca4af6fddc1f8b6767d8 (patch) | |
| tree | c5d52fc4286cc63b981c1dadc86a18688868c6e7 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
| parent | eb7cd6c88928c617f2395b9e2ec262e4bfb43880 (diff) | |
| download | bcm5719-llvm-14e773500e036de57ed0ca4af6fddc1f8b6767d8.tar.gz bcm5719-llvm-14e773500e036de57ed0ca4af6fddc1f8b6767d8.zip | |
[WinEH] Delete the old landingpad implementation of Windows EH
The new implementation works at least as well as the old implementation
did.
Also delete the associated preparation tests. They don't exercise
interesting corner cases of the new implementation. All the codegen
tests of the EH tables have already been ported.
llvm-svn: 249918
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 0df05683b4f..2a25131dbad 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -973,43 +973,6 @@ bool SelectionDAGISel::PrepareEHLandingPad() { BuildMI(*MBB, FuncInfo->InsertPt, SDB->getCurDebugLoc(), II) .addSym(Label); - // If this personality function uses funclets, we need to split the landing - // pad into several BBs. - const Constant *Personality = MF->getFunction()->getPersonalityFn(); - if (const auto *PF = dyn_cast<Function>(Personality->stripPointerCasts())) - MF->getMMI().addPersonality(PF); - EHPersonality PersonalityType = classifyEHPersonality(Personality); - - if (isFuncletEHPersonality(PersonalityType)) { - SmallVector<MachineBasicBlock *, 4> ClauseBBs; - const IntrinsicInst *ActionsCall = - dyn_cast<IntrinsicInst>(LLVMBB->getFirstInsertionPt()); - // Get all invoke BBs that unwind to this landingpad. - SmallVector<MachineBasicBlock *, 4> InvokeBBs(MBB->pred_begin(), - MBB->pred_end()); - if (ActionsCall && ActionsCall->getIntrinsicID() == Intrinsic::eh_actions) { - // If this is a call to llvm.eh.actions followed by indirectbr, then we've - // run WinEHPrepare, and we should remove this block from the machine CFG. - // Mark the targets of the indirectbr as landingpads instead. - for (const BasicBlock *LLVMSucc : successors(LLVMBB)) { - MachineBasicBlock *ClauseBB = FuncInfo->MBBMap[LLVMSucc]; - // Add the edge from the invoke to the clause. - for (MachineBasicBlock *InvokeBB : InvokeBBs) - InvokeBB->addSuccessor(ClauseBB); - - // Mark the clause as a landing pad or MI passes will delete it. - ClauseBB->setIsEHPad(); - } - } - - // Remove the edge from the invoke to the lpad. - for (MachineBasicBlock *InvokeBB : InvokeBBs) - InvokeBB->removeSuccessor(MBB); - - // Don't select instructions for the landingpad. - return false; - } - // Mark exception register as live in. if (unsigned Reg = TLI->getExceptionPointerRegister()) FuncInfo->ExceptionPointerVirtReg = MBB->addLiveIn(Reg, PtrRC); |

