Add TargetInstrInfo predication hooks.
authorEvan Cheng <evan.cheng@apple.com>
Wed, 16 May 2007 01:58:56 +0000 (01:58 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 16 May 2007 01:58:56 +0000 (01:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37091 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetInstrInfo.h

index 29ff38fbc8fc5f94ed69c62289b03e075083e143..71a6dcdeb305775bd018787a44acaa64b340e03e 100644 (file)
@@ -383,6 +383,20 @@ public:
     abort();
   }
 
+  /// isPredicatable - True if the instruction can be converted into a
+  /// predicated instruction.
+  virtual bool isPredicatable(MachineInstr *MI) const {
+    return false;
+  }
+
+  /// PredicateInstruction - Convert the instruction into a predicated
+  /// instruction.
+  virtual void PredicateInstruction(MachineInstr *MI,
+                                    std::vector<MachineOperand> &Cond) const {
+    assert(0 && "Target didn't implement PredicateInstruction!");
+    abort();
+  }
+
   /// getPointerRegClass - Returns a TargetRegisterClass used for pointer
   /// values.
   virtual const TargetRegisterClass *getPointerRegClass() const {