@@ -111,17 +111,16 @@ INITIALIZE_PASS_END(IRTranslator, DEBUG_TYPE, "IRTranslator LLVM IR -> MI",
111111 false , false )
112112
113113static void reportTranslationError(MachineFunction &MF,
114- const TargetPassConfig &TPC,
115114 OptimizationRemarkEmitter &ORE,
116115 OptimizationRemarkMissed &R) {
117116 MF.getProperties ().setFailedISel ();
118117
119118 // Print the function name explicitly if we don't have a debug location (which
120119 // makes the diagnostic less useful) or if we're going to emit a raw error.
121- if (!R.getLocation ().isValid () || TPC. isGlobalISelAbortEnabled ())
120+ if (!R.getLocation ().isValid () || isGlobalISelAbortEnabled (MF ))
122121 R << (" (in function: " + MF.getName () + " )" ).str ();
123122
124- if (TPC. isGlobalISelAbortEnabled ())
123+ if (isGlobalISelAbortEnabled (MF ))
125124 report_fatal_error (Twine (R.getMsg ()));
126125 else
127126 ORE.emit (R);
@@ -242,7 +241,7 @@ ArrayRef<Register> IRTranslator::getOrCreateVRegs(const Value &Val) {
242241 MF->getFunction ().getSubprogram (),
243242 &MF->getFunction ().getEntryBlock ());
244243 R << " unable to translate constant: " << ore::NV (" Type" , Val.getType ());
245- reportTranslationError (*MF, *TPC, * ORE, R);
244+ reportTranslationError (*MF, *ORE, R);
246245 return *VRegs;
247246 }
248247 }
@@ -279,7 +278,7 @@ Align IRTranslator::getMemOpAlign(const Instruction &I) {
279278
280279 OptimizationRemarkMissed R (" gisel-irtranslator" , " " , &I);
281280 R << " unable to translate memop: " << ore::NV (" Opcode" , &I);
282- reportTranslationError (*MF, *TPC, * ORE, R);
281+ reportTranslationError (*MF, *ORE, R);
283282 return Align (1 );
284283}
285284
@@ -4147,7 +4146,7 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &CurMF) {
41474146 OptimizationRemarkMissed R (" gisel-irtranslator" , " GISelFailure" ,
41484147 F.getSubprogram (), &F.getEntryBlock ());
41494148 R << " unable to translate in big endian mode" ;
4150- reportTranslationError (*MF, *TPC, * ORE, R);
4149+ reportTranslationError (*MF, *ORE, R);
41514150 return false ;
41524151 }
41534152
@@ -4191,7 +4190,7 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &CurMF) {
41914190 F.getSubprogram (), &F.getEntryBlock ());
41924191 R << " unable to lower function: "
41934192 << ore::NV (" Prototype" , F.getFunctionType ());
4194- reportTranslationError (*MF, *TPC, * ORE, R);
4193+ reportTranslationError (*MF, *ORE, R);
41954194 return false ;
41964195 }
41974196
@@ -4214,7 +4213,7 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &CurMF) {
42144213 F.getSubprogram (), &F.getEntryBlock ());
42154214 R << " unable to lower arguments: "
42164215 << ore::NV (" Prototype" , F.getFunctionType ());
4217- reportTranslationError (*MF, *TPC, * ORE, R);
4216+ reportTranslationError (*MF, *ORE, R);
42184217 return false ;
42194218 }
42204219
@@ -4265,15 +4264,15 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &CurMF) {
42654264 R << " : '" << InstStrStorage << " '" ;
42664265 }
42674266
4268- reportTranslationError (*MF, *TPC, * ORE, R);
4267+ reportTranslationError (*MF, *ORE, R);
42694268 return false ;
42704269 }
42714270
42724271 if (!finalizeBasicBlock (*BB, MBB)) {
42734272 OptimizationRemarkMissed R (" gisel-irtranslator" , " GISelFailure" ,
42744273 BB->getTerminator ()->getDebugLoc (), BB);
42754274 R << " unable to translate basic block" ;
4276- reportTranslationError (*MF, *TPC, * ORE, R);
4275+ reportTranslationError (*MF, *ORE, R);
42774276 return false ;
42784277 }
42794278 }
0 commit comments