[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)
commitfd9f47756afbb7b9894346c9f3028ff461dd2d58
treefe1b87ae9b7b0931f01b4cccbc8d79405218bd9a
parentf97999dc4631acf35aa0b6050df0e056bc4bfabb
[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

llvm-svn: 244558
llvm/lib/CodeGen/WinEHPrepare.cpp
llvm/lib/Transforms/Utils/DemoteRegToStack.cpp