@@ -69,18 +69,15 @@ static const MachineFunction *getMFIfAvailable(const MachineInstr &MI) {
6969 return nullptr ;
7070}
7171
72- // Try to crawl up to the machine function and get TRI and IntrinsicInfo from
73- // it.
72+ // Try to crawl up to the machine function and get TRI/MRI/TII from it.
7473static void tryToGetTargetInfo (const MachineInstr &MI,
7574 const TargetRegisterInfo *&TRI,
7675 const MachineRegisterInfo *&MRI,
77- const TargetIntrinsicInfo *&IntrinsicInfo,
7876 const TargetInstrInfo *&TII) {
7977
8078 if (const MachineFunction *MF = getMFIfAvailable (MI)) {
8179 TRI = MF->getSubtarget ().getRegisterInfo ();
8280 MRI = &MF->getRegInfo ();
83- IntrinsicInfo = MF->getTarget ().getIntrinsicInfo ();
8481 TII = MF->getSubtarget ().getInstrInfo ();
8582 }
8683}
@@ -1703,8 +1700,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
17031700 // We can be a bit tidier if we know the MachineFunction.
17041701 const TargetRegisterInfo *TRI = nullptr ;
17051702 const MachineRegisterInfo *MRI = nullptr ;
1706- const TargetIntrinsicInfo *IntrinsicInfo = nullptr ;
1707- tryToGetTargetInfo (*this , TRI, MRI, IntrinsicInfo, TII);
1703+ tryToGetTargetInfo (*this , TRI, MRI, TII);
17081704
17091705 if (isCFIInstruction ())
17101706 assert (getNumOperands () == 1 && " Expected 1 operand in CFI instruction" );
@@ -1734,7 +1730,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
17341730 LLT TypeToPrint = MRI ? getTypeToPrint (StartOp, PrintedTypes, *MRI) : LLT{};
17351731 unsigned TiedOperandIdx = getTiedOperandIdx (StartOp);
17361732 MO.print (OS, MST, TypeToPrint, StartOp, /* PrintDef=*/ false , IsStandalone,
1737- ShouldPrintRegisterTies, TiedOperandIdx, TRI, IntrinsicInfo );
1733+ ShouldPrintRegisterTies, TiedOperandIdx, TRI);
17381734 ++StartOp;
17391735 }
17401736
@@ -1794,9 +1790,9 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
17941790 const unsigned OpIdx = InlineAsm::MIOp_AsmString;
17951791 LLT TypeToPrint = MRI ? getTypeToPrint (OpIdx, PrintedTypes, *MRI) : LLT{};
17961792 unsigned TiedOperandIdx = getTiedOperandIdx (OpIdx);
1797- getOperand (OpIdx).print (OS, MST, TypeToPrint, OpIdx, /* PrintDef=*/ true , IsStandalone,
1798- ShouldPrintRegisterTies, TiedOperandIdx, TRI ,
1799- IntrinsicInfo );
1793+ getOperand (OpIdx).print (OS, MST, TypeToPrint, OpIdx, /* PrintDef=*/ true ,
1794+ IsStandalone, ShouldPrintRegisterTies ,
1795+ TiedOperandIdx, TRI );
18001796
18011797 // Print HasSideEffects, MayLoad, MayStore, IsAlignStack
18021798 unsigned ExtraInfo = getOperand (InlineAsm::MIOp_ExtraInfo).getImm ();
@@ -1834,7 +1830,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
18341830 LLT TypeToPrint = MRI ? getTypeToPrint (i, PrintedTypes, *MRI) : LLT{};
18351831 unsigned TiedOperandIdx = getTiedOperandIdx (i);
18361832 MO.print (OS, MST, TypeToPrint, i, /* PrintDef=*/ true , IsStandalone,
1837- ShouldPrintRegisterTies, TiedOperandIdx, TRI, IntrinsicInfo );
1833+ ShouldPrintRegisterTies, TiedOperandIdx, TRI);
18381834 }
18391835 } else if (isDebugLabel () && MO.isMetadata ()) {
18401836 // Pretty print DBG_LABEL instructions.
@@ -1845,7 +1841,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
18451841 LLT TypeToPrint = MRI ? getTypeToPrint (i, PrintedTypes, *MRI) : LLT{};
18461842 unsigned TiedOperandIdx = getTiedOperandIdx (i);
18471843 MO.print (OS, MST, TypeToPrint, i, /* PrintDef=*/ true , IsStandalone,
1848- ShouldPrintRegisterTies, TiedOperandIdx, TRI, IntrinsicInfo );
1844+ ShouldPrintRegisterTies, TiedOperandIdx, TRI);
18491845 }
18501846 } else if (i == AsmDescOp && MO.isImm ()) {
18511847 // Pretty print the inline asm operand descriptor.
@@ -1889,7 +1885,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
18891885 MachineOperand::printSubRegIdx (OS, MO.getImm (), TRI);
18901886 else
18911887 MO.print (OS, MST, TypeToPrint, i, /* PrintDef=*/ true , IsStandalone,
1892- ShouldPrintRegisterTies, TiedOperandIdx, TRI, IntrinsicInfo );
1888+ ShouldPrintRegisterTies, TiedOperandIdx, TRI);
18931889 }
18941890 }
18951891
0 commit comments