mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-24 07:01:35 +00:00
[GlobalISel] Use the DISubprogram for translation failure remarks.
Justin added support for DISubprogram locs in r295531 and r296052. Use that instead of no-loc for constants and arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296058 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0108464498
commit
abdb8cba99
@ -89,7 +89,7 @@ unsigned IRTranslator::getOrCreateVReg(const Value &Val) {
|
||||
bool Success = translate(*CV, VReg);
|
||||
if (!Success) {
|
||||
OptimizationRemarkMissed R("gisel-irtranslator", "GISelFailure",
|
||||
DebugLoc(),
|
||||
MF->getFunction()->getSubprogram(),
|
||||
&MF->getFunction()->getEntryBlock());
|
||||
R << "unable to translate constant: " << ore::NV("Type", Val.getType());
|
||||
reportTranslationError(*MF, *TPC, *ORE, R);
|
||||
@ -1049,7 +1049,8 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &CurMF) {
|
||||
for (const Argument &Arg: F.args())
|
||||
VRegArgs.push_back(getOrCreateVReg(Arg));
|
||||
if (!CLI->lowerFormalArguments(EntryBuilder, F, VRegArgs)) {
|
||||
OptimizationRemarkMissed R("gisel-irtranslator", "GISelFailure", DebugLoc(),
|
||||
OptimizationRemarkMissed R("gisel-irtranslator", "GISelFailure",
|
||||
MF->getFunction()->getSubprogram(),
|
||||
&MF->getFunction()->getEntryBlock());
|
||||
R << "unable to lower arguments: " << ore::NV("Prototype", F.getType());
|
||||
reportTranslationError(*MF, *TPC, *ORE, R);
|
||||
|
@ -166,7 +166,8 @@ bool InstructionSelect::runOnMachineFunction(MachineFunction &MF) {
|
||||
|
||||
if (MF.size() != NumBlocks) {
|
||||
MachineOptimizationRemarkMissed R("gisel-select", "GISelFailure",
|
||||
DebugLoc(), /*MBB=*/nullptr);
|
||||
MF.getFunction()->getSubprogram(),
|
||||
/*MBB=*/nullptr);
|
||||
R << "inserting blocks is not supported yet";
|
||||
reportGISelFailure(MF, TPC, MORE, R);
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user