From dd215236530c9f643220f1c6e928dd39254a7b3d Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Mon, 25 Apr 2016 14:31:32 +0000 Subject: [WinEH] Update SplitAnalysis::computeLastSplitPoint to cope with multiple EH successors We didn't have logic to correctly handle CFGs where there was more than one EH-pad successor (these are novel with WinEH). There were situations where a register was live in one exceptional successor but not another but the code as written would only consider the first exceptional successor it found. This resulted in split points which were insufficiently early if an invoke was present. This fixes PR27501. N.B. This removes getLandingPadSuccessor. llvm-svn: 267412 --- llvm/lib/CodeGen/MachineBasicBlock.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp') diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 318a2aa69d4..8b3f01fe58c 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -198,16 +198,6 @@ MachineBasicBlock::iterator MachineBasicBlock::getLastNonDebugInstr() { return end(); } -const MachineBasicBlock *MachineBasicBlock::getLandingPadSuccessor() const { - // A block with a landing pad successor only has one other successor. - if (succ_size() > 2) - return nullptr; - for (const_succ_iterator I = succ_begin(), E = succ_end(); I != E; ++I) - if ((*I)->isEHPad()) - return *I; - return nullptr; -} - bool MachineBasicBlock::hasEHPadSuccessor() const { for (const_succ_iterator I = succ_begin(), E = succ_end(); I != E; ++I) if ((*I)->isEHPad()) -- cgit v1.2.3