1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 21:42:54 +02:00

[GlobalISel] Remove now-unnecessary variable. NFC.

Since r296047, we're able to return early on failures.
Don't track whether we succeeded.

llvm-svn: 296057
This commit is contained in:
Ahmed Bougacha 2017-02-24 00:34:41 +00:00
parent e6a5937ab3
commit ed60220797

View File

@ -1048,8 +1048,7 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &CurMF) {
SmallVector<unsigned, 8> VRegArgs;
for (const Argument &Arg: F.args())
VRegArgs.push_back(getOrCreateVReg(Arg));
bool Succeeded = CLI->lowerFormalArguments(EntryBuilder, F, VRegArgs);
if (!Succeeded) {
if (!CLI->lowerFormalArguments(EntryBuilder, F, VRegArgs)) {
OptimizationRemarkMissed R("gisel-irtranslator", "GISelFailure", DebugLoc(),
&MF->getFunction()->getEntryBlock());
R << "unable to lower arguments: " << ore::NV("Prototype", F.getType());
@ -1065,19 +1064,19 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &CurMF) {
CurBuilder.setMBB(MBB);
for (const Instruction &Inst: BB) {
Succeeded &= translate(Inst);
if (!Succeeded) {
std::string InstStrStorage;
raw_string_ostream InstStr(InstStrStorage);
InstStr << Inst;
if (translate(Inst))
continue;
OptimizationRemarkMissed R("gisel-irtranslator", "IRTranslatorFailure: ",
&Inst);
R << "unable to translate instruction: " << ore::NV("Opcode", &Inst)
<< ": '" << InstStr.str() << "'";
reportTranslationError(*MF, *TPC, *ORE, R);
return false;
}
std::string InstStrStorage;
raw_string_ostream InstStr(InstStrStorage);
InstStr << Inst;
OptimizationRemarkMissed R("gisel-irtranslator", "IRTranslatorFailure: ",
&Inst);
R << "unable to translate instruction: " << ore::NV("Opcode", &Inst)
<< ": '" << InstStr.str() << "'";
reportTranslationError(*MF, *TPC, *ORE, R);
return false;
}
}