@@ -509,7 +509,10 @@ void SelectionDAGISel::initializeAnalysisResults(
509
509
FnVarLocs = &FAM.getResult <DebugAssignmentTrackingAnalysis>(Fn);
510
510
511
511
auto *UA = FAM.getCachedResult <UniformityInfoAnalysis>(Fn);
512
- CurDAG->init (*MF, *ORE, MFAM, LibInfo, UA, PSI, BFI, FnVarLocs);
512
+ MachineModuleInfo &MMI =
513
+ MAMP.getCachedResult <MachineModuleAnalysis>(*Fn.getParent ())->getMMI ();
514
+
515
+ CurDAG->init (*MF, *ORE, MFAM, LibInfo, UA, PSI, BFI, MMI, FnVarLocs);
513
516
514
517
// Now get the optional analyzes if we want to.
515
518
// This is based on the possibly changed OptLevel (after optnone is taken
@@ -562,7 +565,11 @@ void SelectionDAGISel::initializeAnalysisResults(MachineFunctionPass &MFP) {
562
565
UniformityInfo *UA = nullptr ;
563
566
if (auto *UAPass = MFP.getAnalysisIfAvailable <UniformityInfoWrapperPass>())
564
567
UA = &UAPass->getUniformityInfo ();
565
- CurDAG->init (*MF, *ORE, &MFP, LibInfo, UA, PSI, BFI, FnVarLocs);
568
+
569
+ MachineModuleInfo &MMI =
570
+ MFP.getAnalysis <MachineModuleInfoWrapperPass>().getMMI ();
571
+
572
+ CurDAG->init (*MF, *ORE, &MFP, LibInfo, UA, PSI, BFI, MMI, FnVarLocs);
566
573
567
574
// Now get the optional analyzes if we want to.
568
575
// This is based on the possibly changed OptLevel (after optnone is taken
@@ -796,7 +803,7 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
796
803
}
797
804
798
805
// Determine if floating point is used for msvc
799
- computeUsesMSVCFloatingPoint (TM.getTargetTriple (), Fn, MF ->getMMI ());
806
+ computeUsesMSVCFloatingPoint (TM.getTargetTriple (), Fn, *CurDAG ->getMMI ());
800
807
801
808
// Release function-specific state. SDB and CurDAG are already cleared
802
809
// at this point.
@@ -1443,7 +1450,6 @@ bool SelectionDAGISel::PrepareEHLandingPad() {
1443
1450
1444
1451
// Mark and Report IPToState for each Block under IsEHa
1445
1452
void SelectionDAGISel::reportIPToStateForBlocks (MachineFunction *MF) {
1446
- MachineModuleInfo &MMI = MF->getMMI ();
1447
1453
llvm::WinEHFuncInfo *EHInfo = MF->getWinEHFuncInfo ();
1448
1454
if (!EHInfo)
1449
1455
return ;
@@ -1458,8 +1464,8 @@ void SelectionDAGISel::reportIPToStateForBlocks(MachineFunction *MF) {
1458
1464
continue ;
1459
1465
1460
1466
// Insert EH Labels
1461
- MCSymbol *BeginLabel = MMI. getContext ().createTempSymbol ();
1462
- MCSymbol *EndLabel = MMI. getContext ().createTempSymbol ();
1467
+ MCSymbol *BeginLabel = MF-> getContext ().createTempSymbol ();
1468
+ MCSymbol *EndLabel = MF-> getContext ().createTempSymbol ();
1463
1469
EHInfo->addIPToStateRange (State, BeginLabel, EndLabel);
1464
1470
BuildMI (MBB, MBBb, SDB->getCurDebugLoc (),
1465
1471
TII->get (TargetOpcode::EH_LABEL))
0 commit comments