diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-08-11 01:15:26 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-08-11 01:15:26 +0000 |
commit | fd9f47756afbb7b9894346c9f3028ff461dd2d58 (patch) | |
tree | fe1b87ae9b7b0931f01b4cccbc8d79405218bd9a /llvm/lib/Transforms/Utils/DemoteRegToStack.cpp | |
parent | f97999dc4631acf35aa0b6050df0e056bc4bfabb (diff) | |
download | llvm-fd9f47756afbb7b9894346c9f3028ff461dd2d58.zip llvm-fd9f47756afbb7b9894346c9f3028ff461dd2d58.tar.gz llvm-fd9f47756afbb7b9894346c9f3028ff461dd2d58.tar.bz2 |
[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
Diffstat (limited to 'llvm/lib/Transforms/Utils/DemoteRegToStack.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/DemoteRegToStack.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp b/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp index f11b6099..1d7c740 100644 --- a/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp +++ b/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp @@ -135,7 +135,7 @@ AllocaInst *llvm::DemotePHIToStack(PHINode *P, Instruction *AllocaPoint) { // Insert a load in place of the PHI and replace all uses. BasicBlock::iterator InsertPt = P; - for (; isa<PHINode>(InsertPt) || isa<LandingPadInst>(InsertPt); ++InsertPt) + for (; isa<PHINode>(InsertPt) || InsertPt->isEHPad(); ++InsertPt) /* empty */; // Don't insert before PHI nodes or landingpad instrs. Value *V = new LoadInst(Slot, P->getName()+".reload", InsertPt); |