[WinEHPrepare] Add rudimentary support for the new EH instructions
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 11 Aug 2015 01:15:26 +0000 (01:15 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 11 Aug 2015 01:15:26 +0000 (01:15 +0000)
commit7c58a664e0339471d5834b4ac34a5408792852d1
treed2904d7fd7f8ab64feb7334b6d716e2f9e005ffe
parent7ec94a3dea2cf5952db9c833a06d609b04257239
[WinEHPrepare] Add rudimentary support for the new EH instructions

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.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244558 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/WinEHPrepare.cpp
lib/Transforms/Utils/DemoteRegToStack.cpp