Rename M_PREDICATED to M_PREDICABLE; Move TargetInstrInfo::isPredicatable() to Machin...
authorEvan Cheng <evan.cheng@apple.com>
Wed, 16 May 2007 20:43:42 +0000 (20:43 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 16 May 2007 20:43:42 +0000 (20:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37115 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineInstr.h
include/llvm/Target/TargetInstrInfo.h

index c722f13449abd88bb949101cb7ca9533a879f9d8..52ae842da34b2d83cd1b5b2127f0c2db21cee96f 100644 (file)
@@ -394,6 +394,10 @@ public:
     return true;
   }
 
+  /// isPredicable - True if the instruction can be converted into a
+  /// predicated instruction.
+  bool isPredicable() const;
+
   /// clone - Create a copy of 'this' instruction that is identical in
   /// all ways except the the instruction has no parent, prev, or next.
   MachineInstr* clone() const { return new MachineInstr(*this); }
index 9b097f41c2daaa4e576864caac36a972973fc011..7c2cfac8359b633458636d406c7127f95baa8be7 100644 (file)
@@ -74,9 +74,9 @@ const unsigned M_USES_CUSTOM_DAG_SCHED_INSERTION = 1 << 10;
 // operands in addition to the minimum number operands specified.
 const unsigned M_VARIABLE_OPS = 1 << 11;
 
-// M_PREDICATED - Set if this instruction has a predicate that controls its
-// execution.
-const unsigned M_PREDICATED = 1 << 12;
+// M_PREDICABLE - Set if this instruction has a predicate operand that
+// controls execution. It may be set to 'always'.
+const unsigned M_PREDICABLE = 1 << 12;
 
 // M_REMATERIALIZIBLE - Set if this instruction can be trivally re-materialized
 // at any time, e.g. constant generation, load from constant pool.
@@ -208,8 +208,8 @@ public:
     return get(Opcode).Flags & M_RET_FLAG;
   }
 
-  bool isPredicated(MachineOpCode Opcode) const {
-    return get(Opcode).Flags & M_PREDICATED;
+  bool isPredicable(MachineOpCode Opcode) const {
+    return get(Opcode).Flags & M_PREDICABLE;
   }
   bool isReMaterializable(MachineOpCode Opcode) const {
     return get(Opcode).Flags & M_REMATERIALIZIBLE;
@@ -389,19 +389,10 @@ 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();
-  }
+                                    std::vector<MachineOperand> &Cond) const;
 
   /// getPointerRegClass - Returns a TargetRegisterClass used for pointer
   /// values.