OSDN Git Service

[WinEH] Update SplitAnalysis::computeLastSplitPoint to cope with multiple EH successors
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 25 Apr 2016 14:31:32 +0000 (14:31 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 25 Apr 2016 14:31:32 +0000 (14:31 +0000)
commite7edf2d8d2e4197cd636f75bedf14210b81116f5
tree071dd6b5ae25d6c95426aa76e6eb3dffc1f9d985
parenta1ebe98fd32a29710a39fff39ca84a0ce24b7457
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267412 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/STLExtras.h
include/llvm/CodeGen/MachineBasicBlock.h
lib/CodeGen/MachineBasicBlock.cpp
lib/CodeGen/SplitKit.cpp
test/CodeGen/X86/pr27501.ll [new file with mode: 0644]