diff options
author | Quentin Colombet <qcolombet@apple.com> | 2016-08-27 00:18:24 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2016-08-27 00:18:24 +0000 |
commit | 6049524d37de125850fffd1c2e571c96dcaad97b (patch) | |
tree | af70ee89ad10c5273d9878acf628d07d4df94742 /llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp | |
parent | aea50f8b84527110d5c3a4a238154eec4539b4a2 (diff) | |
download | bcm5719-llvm-6049524d37de125850fffd1c2e571c96dcaad97b.tar.gz bcm5719-llvm-6049524d37de125850fffd1c2e571c96dcaad97b.zip |
[GlobalISel] Teach the core pipeline not to run if ISel failed.
llvm-svn: 279889
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp b/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp index 4ef4c43f763..302c3763d00 100644 --- a/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp +++ b/llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp @@ -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(); |