forked from OSchip/llvm-project
[GlobalISel] Teach the core pipeline not to run if ISel failed.
llvm-svn: 279889
This commit is contained in:
parent
aea50f8b84
commit
6049524d37
|
@ -43,6 +43,11 @@ static void reportSelectionError(const MachineInstr &MI, const Twine &Message) {
|
|||
}
|
||||
|
||||
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();
|
||||
|
|
|
@ -37,6 +37,10 @@ void MachineLegalizePass::init(MachineFunction &MF) {
|
|||
}
|
||||
|
||||
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();
|
||||
|
|
|
@ -537,6 +537,11 @@ void RegBankSelect::assignInstr(MachineInstr &MI) {
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue