@@ -111,17 +111,17 @@ 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 () ||
121+ isGlobalISelAbortEnabled (MF.getTarget ().Options ))
122122 R << (" (in function: " + MF.getName () + " )" ).str ();
123123
124- if (TPC. isGlobalISelAbortEnabled ())
124+ if (isGlobalISelAbortEnabled (MF. getTarget (). Options ))
125125 report_fatal_error (Twine (R.getMsg ()));
126126 else
127127 ORE.emit (R);
@@ -242,7 +242,7 @@ ArrayRef<Register> IRTranslator::getOrCreateVRegs(const Value &Val) {
242242 MF->getFunction ().getSubprogram (),
243243 &MF->getFunction ().getEntryBlock ());
244244 R << " unable to translate constant: " << ore::NV (" Type" , Val.getType ());
245- reportTranslationError (*MF, *TPC, * ORE, R);
245+ reportTranslationError (*MF, *ORE, R);
246246 return *VRegs;
247247 }
248248 }
@@ -279,7 +279,7 @@ Align IRTranslator::getMemOpAlign(const Instruction &I) {
279279
280280 OptimizationRemarkMissed R (" gisel-irtranslator" , " " , &I);
281281 R << " unable to translate memop: " << ore::NV (" Opcode" , &I);
282- reportTranslationError (*MF, *TPC, * ORE, R);
282+ reportTranslationError (*MF, *ORE, R);
283283 return Align (1 );
284284}
285285
@@ -4147,7 +4147,7 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &CurMF) {
41474147 OptimizationRemarkMissed R (" gisel-irtranslator" , " GISelFailure" ,
41484148 F.getSubprogram (), &F.getEntryBlock ());
41494149 R << " unable to translate in big endian mode" ;
4150- reportTranslationError (*MF, *TPC, * ORE, R);
4150+ reportTranslationError (*MF, *ORE, R);
41514151 return false ;
41524152 }
41534153
@@ -4191,7 +4191,7 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &CurMF) {
41914191 F.getSubprogram (), &F.getEntryBlock ());
41924192 R << " unable to lower function: "
41934193 << ore::NV (" Prototype" , F.getFunctionType ());
4194- reportTranslationError (*MF, *TPC, * ORE, R);
4194+ reportTranslationError (*MF, *ORE, R);
41954195 return false ;
41964196 }
41974197
@@ -4214,7 +4214,7 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &CurMF) {
42144214 F.getSubprogram (), &F.getEntryBlock ());
42154215 R << " unable to lower arguments: "
42164216 << ore::NV (" Prototype" , F.getFunctionType ());
4217- reportTranslationError (*MF, *TPC, * ORE, R);
4217+ reportTranslationError (*MF, *ORE, R);
42184218 return false ;
42194219 }
42204220
@@ -4265,15 +4265,15 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &CurMF) {
42654265 R << " : '" << InstStrStorage << " '" ;
42664266 }
42674267
4268- reportTranslationError (*MF, *TPC, * ORE, R);
4268+ reportTranslationError (*MF, *ORE, R);
42694269 return false ;
42704270 }
42714271
42724272 if (!finalizeBasicBlock (*BB, MBB)) {
42734273 OptimizationRemarkMissed R (" gisel-irtranslator" , " GISelFailure" ,
42744274 BB->getTerminator ()->getDebugLoc (), BB);
42754275 R << " unable to translate basic block" ;
4276- reportTranslationError (*MF, *TPC, * ORE, R);
4276+ reportTranslationError (*MF, *ORE, R);
42774277 return false ;
42784278 }
42794279 }
0 commit comments