[WinEH] Add and use hasEHPadSuccessor instead of getLandingPadSuccessor
authorReid Kleckner <rnk@google.com>
Thu, 17 Sep 2015 17:19:40 +0000 (17:19 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 17 Sep 2015 17:19:40 +0000 (17:19 +0000)
commit7ad3e0e00912056833dfd972d0b9c209666c1b9e
tree7a14246b537db1b0598280ebe868439556585e35
parent3250d26bcabe5d5830a66c61f3a601c8ce4b4188
[WinEH] Add and use hasEHPadSuccessor instead of getLandingPadSuccessor

getLandingPadSuccessor assumes that each invoke can have at most one EH
pad successor, but WinEH invokes can have more than one. Two out of
three callers of getLandingPadSuccessor don't use the returned
landingpad, so we can make them use this simple predicate instead.

Eventually we'll have to circle back and fix SplitKit.cpp so that
register allocation works. Baby steps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247904 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineBasicBlock.h
lib/CodeGen/BranchFolding.cpp
lib/CodeGen/MachineBasicBlock.cpp
lib/CodeGen/SplitKit.cpp
lib/CodeGen/TailDuplication.cpp
test/CodeGen/X86/tail-merge-wineh.ll [new file with mode: 0644]