[llvm] r279885 - [MFProperties] Introduce a FailedISel property.

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 26 16:49:01 PDT 2016


Author: qcolombet
Date: Fri Aug 26 18:49:01 2016
New Revision: 279885

URL: http://llvm.org/viewvc/llvm-project?rev=279885&view=rev
Log:
[MFProperties] Introduce a FailedISel property.

This is used to communicate that the instruction selection pipeline
failed at some point.
Another way to achieve that would be to have some kind of conditional
scheduling in the PassManager, such that we only schedule a pass based
on the success/failure of another one. The property approach has the
advantage of being lightweight and solve the problem at stake.

Modified:
    llvm/trunk/include/llvm/CodeGen/MachineFunction.h
    llvm/trunk/lib/CodeGen/MachineFunction.cpp

Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=279885&r1=279884&r2=279885&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineFunction.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h Fri Aug 26 18:49:01 2016
@@ -119,6 +119,7 @@ public:
     NoPHIs,
     TracksLiveness,
     NoVRegs,
+    FailedISel,
     Legalized,
     RegBankSelected,
     Selected,

Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=279885&r1=279884&r2=279885&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Fri Aug 26 18:49:01 2016
@@ -57,6 +57,7 @@ void MachineFunctionInitializer::anchor(
 static const char *getPropertyName(MachineFunctionProperties::Property Prop) {
   typedef MachineFunctionProperties::Property P;
   switch(Prop) {
+  case P::FailedISel: return "FailedISel";
   case P::IsSSA: return "IsSSA";
   case P::Legalized: return "Legalized";
   case P::NoPHIs: return "NoPHIs";




More information about the llvm-commits mailing list