[WinEHPrepare] Add rudimentary support for the new EH instructions
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 6 Aug 2015 21:07:55 +0000 (21:07 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 6 Aug 2015 21:07:55 +0000 (21:07 +0000)
commite4abcef986e02d391d8086470c3b97abaea9a20b
tree14f955484bba998404fec96312ceb3b6d000c775
parentf13c68d4b13e62d9b015698f67cab68088c60cd8
[WinEHPrepare] Add rudimentary support for the new EH instructions

Summary:
This adds somewhat basic preparation functionality including:
- Formation of funclets via coloring basic blocks.
- Cloning of polychromatic blocks to ensure that funclets have unique
  program counters.
- Demotion of values used between different funclets.
- Some amount of cleanup once we have removed predecessors from basic
  blocks.
- Verification that we are left with a CFG that makes some amount of
  sense.

N.B. Arguments and numbering still need to be done.

Reviewers: rnk, JosephTremoulet

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11750

llvm-svn: 244272
llvm/lib/CodeGen/WinEHPrepare.cpp