summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorJoseph Tremoulet <jotrem@microsoft.com>2015-10-06 20:30:33 +0000
committerJoseph Tremoulet <jotrem@microsoft.com>2015-10-06 20:30:33 +0000
commit7f8c1165cdf3dcd614d4c56fc78c2fa378047bab (patch)
tree5715a9fed8476c89bec8e93427d8a3c0e1eae7e1 /llvm/lib/CodeGen/SelectionDAG
parent07a1c459f2631f2ad3e95d4becc0cd38af6a9be4 (diff)
downloadbcm5719-llvm-7f8c1165cdf3dcd614d4c56fc78c2fa378047bab.tar.gz
bcm5719-llvm-7f8c1165cdf3dcd614d4c56fc78c2fa378047bab.zip
[WinEH] Implement state numbering for CoreCLR
Summary: Assign one state number per handler/funclet, tracking parent state, handler type, and catch type token. State numbers are arranged such that ancestors have lower state numbers than their descendants. Reviewers: majnemer, andrew.w.kaylor, rnk Subscribers: pgavlin, AndyAyers, llvm-commits Differential Revision: http://reviews.llvm.org/D13450 llvm-svn: 249457
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
index fb455943f90..d718ede35cd 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
@@ -292,6 +292,8 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
calculateWinCXXEHStateNumbers(WinEHParentFn, EHInfo);
else if (isAsynchronousEHPersonality(Personality))
calculateSEHStateNumbers(WinEHParentFn, EHInfo);
+ else if (Personality == EHPersonality::CoreCLR)
+ calculateClrEHStateNumbers(WinEHParentFn, EHInfo);
calculateCatchReturnSuccessorColors(WinEHParentFn, EHInfo);
@@ -316,6 +318,10 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
const BasicBlock *BB = UME.Handler.get<const BasicBlock *>();
UME.Handler = MBBMap[BB];
}
+ for (ClrEHUnwindMapEntry &CME : EHInfo.ClrEHUnwindMap) {
+ const BasicBlock *BB = CME.Handler.get<const BasicBlock *>();
+ CME.Handler = MBBMap[BB];
+ }
// If there's an explicit EH registration node on the stack, record its
// frame index.
OpenPOWER on IntegriCloud