[llvm] a018353 - Revert "[NFC][EarlyIfConverter] Remove unused member variables"

Juan Manuel Martinez Caamaño via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 7 05:41:52 PDT 2024


Author: Juan Manuel Martinez Caamaño
Date: 2024-10-07T14:37:37+02:00
New Revision: a018353f4b2207c6e6a82408cfe51152b03f7868

URL: https://github.com/llvm/llvm-project/commit/a018353f4b2207c6e6a82408cfe51152b03f7868
DIFF: https://github.com/llvm/llvm-project/commit/a018353f4b2207c6e6a82408cfe51152b03f7868.diff

LOG: Revert "[NFC][EarlyIfConverter] Remove unused member variables"

This reverts commit 3c83102f0615c7d66f6df698ca472ddbf0e9483d.

Added: 
    

Modified: 
    llvm/lib/CodeGen/EarlyIfConversion.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/EarlyIfConversion.cpp b/llvm/lib/CodeGen/EarlyIfConversion.cpp
index bd401be37189df..2b97fa449f08f7 100644
--- a/llvm/lib/CodeGen/EarlyIfConversion.cpp
+++ b/llvm/lib/CodeGen/EarlyIfConversion.cpp
@@ -662,6 +662,8 @@ void SSAIfConv::convertIf(SmallVectorImpl<MachineBasicBlock *> &RemoveBlocks) {
 
 namespace {
 class EarlyIfConverter : public MachineFunctionPass {
+  const TargetInstrInfo *TII = nullptr;
+  const TargetRegisterInfo *TRI = nullptr;
   MCSchedModel SchedModel;
   MachineRegisterInfo *MRI = nullptr;
   MachineDominatorTree *DomTree = nullptr;
@@ -1025,6 +1027,8 @@ bool EarlyIfConverter::runOnMachineFunction(MachineFunction &MF) {
   if (!STI.enableEarlyIfConversion())
     return false;
 
+  TII = STI.getInstrInfo();
+  TRI = STI.getRegisterInfo();
   SchedModel = STI.getSchedModel();
   MRI = &MF.getRegInfo();
   DomTree = &getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree();
@@ -1054,7 +1058,9 @@ bool EarlyIfConverter::runOnMachineFunction(MachineFunction &MF) {
 namespace {
 class EarlyIfPredicator : public MachineFunctionPass {
   const TargetInstrInfo *TII = nullptr;
+  const TargetRegisterInfo *TRI = nullptr;
   TargetSchedModel SchedModel;
+  MachineRegisterInfo *MRI = nullptr;
   MachineDominatorTree *DomTree = nullptr;
   MachineBranchProbabilityInfo *MBPI = nullptr;
   MachineLoopInfo *Loops = nullptr;
@@ -1201,6 +1207,8 @@ bool EarlyIfPredicator::runOnMachineFunction(MachineFunction &MF) {
 
   const TargetSubtargetInfo &STI = MF.getSubtarget();
   TII = STI.getInstrInfo();
+  TRI = STI.getRegisterInfo();
+  MRI = &MF.getRegInfo();
   SchedModel.init(&STI);
   DomTree = &getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree();
   Loops = &getAnalysis<MachineLoopInfoWrapperPass>().getLI();


        


More information about the llvm-commits mailing list