[llvm] r279889 - [GlobalISel] Teach the core pipeline not to run if ISel failed.
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 26 17:18:25 PDT 2016
Author: qcolombet
Date: Fri Aug 26 19:18:24 2016
New Revision: 279889
URL: http://llvm.org/viewvc/llvm-project?rev=279889&view=rev
Log:
[GlobalISel] Teach the core pipeline not to run if ISel failed.
Modified:
llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp
llvm/trunk/lib/CodeGen/GlobalISel/MachineLegalizePass.cpp
llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp
Modified: llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp?rev=279889&r1=279888&r2=279889&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp Fri Aug 26 19:18:24 2016
@@ -43,6 +43,11 @@ static void reportSelectionError(const M
}
bool InstructionSelect::runOnMachineFunction(MachineFunction &MF) {
+ // If the ISel pipeline failed, do not bother running that pass.
+ if (MF.getProperties().hasProperty(
+ MachineFunctionProperties::Property::FailedISel))
+ return false;
+
DEBUG(dbgs() << "Selecting function: " << MF.getName() << '\n');
const InstructionSelector *ISel = MF.getSubtarget().getInstructionSelector();
Modified: llvm/trunk/lib/CodeGen/GlobalISel/MachineLegalizePass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/MachineLegalizePass.cpp?rev=279889&r1=279888&r2=279889&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/MachineLegalizePass.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/MachineLegalizePass.cpp Fri Aug 26 19:18:24 2016
@@ -37,6 +37,10 @@ void MachineLegalizePass::init(MachineFu
}
bool MachineLegalizePass::runOnMachineFunction(MachineFunction &MF) {
+ // If the ISel pipeline failed, do not bother running that pass.
+ if (MF.getProperties().hasProperty(
+ MachineFunctionProperties::Property::FailedISel))
+ return false;
DEBUG(dbgs() << "Legalize Machine IR for: " << MF.getName() << '\n');
init(MF);
const MachineLegalizer &Legalizer = *MF.getSubtarget().getMachineLegalizer();
Modified: llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp?rev=279889&r1=279888&r2=279889&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/RegBankSelect.cpp Fri Aug 26 19:18:24 2016
@@ -537,6 +537,11 @@ void RegBankSelect::assignInstr(MachineI
}
bool RegBankSelect::runOnMachineFunction(MachineFunction &MF) {
+ // If the ISel pipeline failed, do not bother running that pass.
+ if (MF.getProperties().hasProperty(
+ MachineFunctionProperties::Property::FailedISel))
+ return false;
+
DEBUG(dbgs() << "Assign register banks for: " << MF.getName() << '\n');
const Function *F = MF.getFunction();
Mode SaveOptMode = OptMode;
More information about the llvm-commits
mailing list