Skip to content

Commit a018353

Browse files
committed
Revert "[NFC][EarlyIfConverter] Remove unused member variables"
This reverts commit 3c83102.
1 parent ee57a68 commit a018353

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llvm/lib/CodeGen/EarlyIfConversion.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,8 @@ void SSAIfConv::convertIf(SmallVectorImpl<MachineBasicBlock *> &RemoveBlocks) {
662662

663663
namespace {
664664
class EarlyIfConverter : public MachineFunctionPass {
665+
const TargetInstrInfo *TII = nullptr;
666+
const TargetRegisterInfo *TRI = nullptr;
665667
MCSchedModel SchedModel;
666668
MachineRegisterInfo *MRI = nullptr;
667669
MachineDominatorTree *DomTree = nullptr;
@@ -1025,6 +1027,8 @@ bool EarlyIfConverter::runOnMachineFunction(MachineFunction &MF) {
10251027
if (!STI.enableEarlyIfConversion())
10261028
return false;
10271029

1030+
TII = STI.getInstrInfo();
1031+
TRI = STI.getRegisterInfo();
10281032
SchedModel = STI.getSchedModel();
10291033
MRI = &MF.getRegInfo();
10301034
DomTree = &getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree();
@@ -1054,7 +1058,9 @@ bool EarlyIfConverter::runOnMachineFunction(MachineFunction &MF) {
10541058
namespace {
10551059
class EarlyIfPredicator : public MachineFunctionPass {
10561060
const TargetInstrInfo *TII = nullptr;
1061+
const TargetRegisterInfo *TRI = nullptr;
10571062
TargetSchedModel SchedModel;
1063+
MachineRegisterInfo *MRI = nullptr;
10581064
MachineDominatorTree *DomTree = nullptr;
10591065
MachineBranchProbabilityInfo *MBPI = nullptr;
10601066
MachineLoopInfo *Loops = nullptr;
@@ -1201,6 +1207,8 @@ bool EarlyIfPredicator::runOnMachineFunction(MachineFunction &MF) {
12011207

12021208
const TargetSubtargetInfo &STI = MF.getSubtarget();
12031209
TII = STI.getInstrInfo();
1210+
TRI = STI.getRegisterInfo();
1211+
MRI = &MF.getRegInfo();
12041212
SchedModel.init(&STI);
12051213
DomTree = &getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree();
12061214
Loops = &getAnalysis<MachineLoopInfoWrapperPass>().getLI();

0 commit comments

Comments
 (0)