summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp20
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp11
2 files changed, 5 insertions, 26 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
index 52216c2c1e8..8d42dcef140 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
@@ -287,7 +287,7 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
return;
// Calculate state numbers if we haven't already.
- WinEHFuncInfo &EHInfo = MMI.getWinEHFuncInfo(&fn);
+ WinEHFuncInfo &EHInfo = *MF->getWinEHFuncInfo();
if (Personality == EHPersonality::MSVC_CXX)
calculateWinCXXEHStateNumbers(&fn, EHInfo);
else if (isAsynchronousEHPersonality(Personality))
@@ -321,24 +321,6 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
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.
- if (EHInfo.EHRegNode && EHInfo.EHRegNode->getParent()->getParent() == Fn) {
- assert(StaticAllocaMap.count(EHInfo.EHRegNode));
- EHInfo.EHRegNodeFrameIndex = StaticAllocaMap[EHInfo.EHRegNode];
- }
-
- // Copy the state numbers to LandingPadInfo for the current function, which
- // could be a handler or the parent. This should happen for 32-bit SEH and
- // C++ EH.
- if (Personality == EHPersonality::MSVC_CXX ||
- Personality == EHPersonality::MSVC_X86SEH) {
- for (const LandingPadInst *LP : LPads) {
- MachineBasicBlock *LPadMBB = MBBMap[LP->getParent()];
- MMI.addWinEHState(LPadMBB, EHInfo.EHPadStateMap[LP]);
- }
- }
}
/// clear - Clear out all the function-specific state. This returns this
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 63b5d02a65a..a699f9c56f2 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -1221,10 +1221,8 @@ void SelectionDAGBuilder::visitCatchRet(const CatchReturnInst &I) {
// Figure out the funclet membership for the catchret's successor.
// This will be used by the FuncletLayout pass to determine how to order the
// BB's.
- MachineModuleInfo &MMI = DAG.getMachineFunction().getMMI();
- WinEHFuncInfo &EHInfo =
- MMI.getWinEHFuncInfo(DAG.getMachineFunction().getFunction());
- const BasicBlock *SuccessorColor = EHInfo.CatchRetSuccessorColorMap[&I];
+ WinEHFuncInfo *EHInfo = DAG.getMachineFunction().getWinEHFuncInfo();
+ const BasicBlock *SuccessorColor = EHInfo->CatchRetSuccessorColorMap[&I];
assert(SuccessorColor && "No parent funclet for catchret!");
MachineBasicBlock *SuccessorColorMBB = FuncInfo.MBBMap[SuccessorColor];
assert(SuccessorColorMBB && "No MBB for SuccessorColor!");
@@ -5341,9 +5339,8 @@ SelectionDAGBuilder::lowerInvokable(TargetLowering::CallLoweringInfo &CLI,
// Inform MachineModuleInfo of range.
if (MMI.hasEHFunclets()) {
- WinEHFuncInfo &EHInfo =
- MMI.getWinEHFuncInfo(DAG.getMachineFunction().getFunction());
- EHInfo.addIPToStateRange(EHPadBB, BeginLabel, EndLabel);
+ WinEHFuncInfo *EHInfo = DAG.getMachineFunction().getWinEHFuncInfo();
+ EHInfo->addIPToStateRange(EHPadBB, BeginLabel, EndLabel);
} else {
MMI.addInvoke(FuncInfo.MBBMap[EHPadBB], BeginLabel, EndLabel);
}
OpenPOWER on IntegriCloud