@@ -662,6 +662,8 @@ void SSAIfConv::convertIf(SmallVectorImpl<MachineBasicBlock *> &RemoveBlocks) {
662
662
663
663
namespace {
664
664
class EarlyIfConverter : public MachineFunctionPass {
665
+ const TargetInstrInfo *TII = nullptr ;
666
+ const TargetRegisterInfo *TRI = nullptr ;
665
667
MCSchedModel SchedModel;
666
668
MachineRegisterInfo *MRI = nullptr ;
667
669
MachineDominatorTree *DomTree = nullptr ;
@@ -1025,6 +1027,8 @@ bool EarlyIfConverter::runOnMachineFunction(MachineFunction &MF) {
1025
1027
if (!STI.enableEarlyIfConversion ())
1026
1028
return false ;
1027
1029
1030
+ TII = STI.getInstrInfo ();
1031
+ TRI = STI.getRegisterInfo ();
1028
1032
SchedModel = STI.getSchedModel ();
1029
1033
MRI = &MF.getRegInfo ();
1030
1034
DomTree = &getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree ();
@@ -1054,7 +1058,9 @@ bool EarlyIfConverter::runOnMachineFunction(MachineFunction &MF) {
1054
1058
namespace {
1055
1059
class EarlyIfPredicator : public MachineFunctionPass {
1056
1060
const TargetInstrInfo *TII = nullptr ;
1061
+ const TargetRegisterInfo *TRI = nullptr ;
1057
1062
TargetSchedModel SchedModel;
1063
+ MachineRegisterInfo *MRI = nullptr ;
1058
1064
MachineDominatorTree *DomTree = nullptr ;
1059
1065
MachineBranchProbabilityInfo *MBPI = nullptr ;
1060
1066
MachineLoopInfo *Loops = nullptr ;
@@ -1201,6 +1207,8 @@ bool EarlyIfPredicator::runOnMachineFunction(MachineFunction &MF) {
1201
1207
1202
1208
const TargetSubtargetInfo &STI = MF.getSubtarget ();
1203
1209
TII = STI.getInstrInfo ();
1210
+ TRI = STI.getRegisterInfo ();
1211
+ MRI = &MF.getRegInfo ();
1204
1212
SchedModel.init (&STI);
1205
1213
DomTree = &getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree ();
1206
1214
Loops = &getAnalysis<MachineLoopInfoWrapperPass>().getLI ();
0 commit comments