@@ -70,18 +70,15 @@ static const MachineFunction *getMFIfAvailable(const MachineInstr &MI) {
7070 return nullptr ;
7171}
7272
73- // Try to crawl up to the machine function and get TRI and IntrinsicInfo from
74- // it.
73+ // Try to crawl up to the machine function and get TRI/MRI/TII from it.
7574static void tryToGetTargetInfo (const MachineInstr &MI,
7675 const TargetRegisterInfo *&TRI,
7776 const MachineRegisterInfo *&MRI,
78- const TargetIntrinsicInfo *&IntrinsicInfo,
7977 const TargetInstrInfo *&TII) {
8078
8179 if (const MachineFunction *MF = getMFIfAvailable (MI)) {
8280 TRI = MF->getSubtarget ().getRegisterInfo ();
8381 MRI = &MF->getRegInfo ();
84- IntrinsicInfo = MF->getTarget ().getIntrinsicInfo ();
8582 TII = MF->getSubtarget ().getInstrInfo ();
8683 }
8784}
@@ -1753,8 +1750,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
17531750 // We can be a bit tidier if we know the MachineFunction.
17541751 const TargetRegisterInfo *TRI = nullptr ;
17551752 const MachineRegisterInfo *MRI = nullptr ;
1756- const TargetIntrinsicInfo *IntrinsicInfo = nullptr ;
1757- tryToGetTargetInfo (*this , TRI, MRI, IntrinsicInfo, TII);
1753+ tryToGetTargetInfo (*this , TRI, MRI, TII);
17581754
17591755 if (isCFIInstruction ())
17601756 assert (getNumOperands () == 1 && " Expected 1 operand in CFI instruction" );
@@ -1784,7 +1780,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
17841780 LLT TypeToPrint = MRI ? getTypeToPrint (StartOp, PrintedTypes, *MRI) : LLT{};
17851781 unsigned TiedOperandIdx = getTiedOperandIdx (StartOp);
17861782 MO.print (OS, MST, TypeToPrint, StartOp, /* PrintDef=*/ false , IsStandalone,
1787- ShouldPrintRegisterTies, TiedOperandIdx, TRI, IntrinsicInfo );
1783+ ShouldPrintRegisterTies, TiedOperandIdx, TRI);
17881784 ++StartOp;
17891785 }
17901786
@@ -1846,9 +1842,9 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
18461842 const unsigned OpIdx = InlineAsm::MIOp_AsmString;
18471843 LLT TypeToPrint = MRI ? getTypeToPrint (OpIdx, PrintedTypes, *MRI) : LLT{};
18481844 unsigned TiedOperandIdx = getTiedOperandIdx (OpIdx);
1849- getOperand (OpIdx).print (OS, MST, TypeToPrint, OpIdx, /* PrintDef=*/ true , IsStandalone,
1850- ShouldPrintRegisterTies, TiedOperandIdx, TRI ,
1851- IntrinsicInfo );
1845+ getOperand (OpIdx).print (OS, MST, TypeToPrint, OpIdx, /* PrintDef=*/ true ,
1846+ IsStandalone, ShouldPrintRegisterTies ,
1847+ TiedOperandIdx, TRI );
18521848
18531849 // Print HasSideEffects, MayLoad, MayStore, IsAlignStack
18541850 unsigned ExtraInfo = getOperand (InlineAsm::MIOp_ExtraInfo).getImm ();
@@ -1886,7 +1882,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
18861882 LLT TypeToPrint = MRI ? getTypeToPrint (i, PrintedTypes, *MRI) : LLT{};
18871883 unsigned TiedOperandIdx = getTiedOperandIdx (i);
18881884 MO.print (OS, MST, TypeToPrint, i, /* PrintDef=*/ true , IsStandalone,
1889- ShouldPrintRegisterTies, TiedOperandIdx, TRI, IntrinsicInfo );
1885+ ShouldPrintRegisterTies, TiedOperandIdx, TRI);
18901886 }
18911887 } else if (isDebugLabel () && MO.isMetadata ()) {
18921888 // Pretty print DBG_LABEL instructions.
@@ -1897,7 +1893,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
18971893 LLT TypeToPrint = MRI ? getTypeToPrint (i, PrintedTypes, *MRI) : LLT{};
18981894 unsigned TiedOperandIdx = getTiedOperandIdx (i);
18991895 MO.print (OS, MST, TypeToPrint, i, /* PrintDef=*/ true , IsStandalone,
1900- ShouldPrintRegisterTies, TiedOperandIdx, TRI, IntrinsicInfo );
1896+ ShouldPrintRegisterTies, TiedOperandIdx, TRI);
19011897 }
19021898 } else if (i == AsmDescOp && MO.isImm ()) {
19031899 // Pretty print the inline asm operand descriptor.
@@ -1941,7 +1937,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
19411937 MachineOperand::printSubRegIdx (OS, MO.getImm (), TRI);
19421938 else
19431939 MO.print (OS, MST, TypeToPrint, i, /* PrintDef=*/ true , IsStandalone,
1944- ShouldPrintRegisterTies, TiedOperandIdx, TRI, IntrinsicInfo );
1940+ ShouldPrintRegisterTies, TiedOperandIdx, TRI);
19451941 }
19461942 }
19471943
0 commit comments