Allow target to disable if-converting predicable instructions. e.g. NEON instructions...
authorEvan Cheng <evan.cheng@apple.com>
Sat, 21 Nov 2009 06:20:26 +0000 (06:20 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Sat, 21 Nov 2009 06:20:26 +0000 (06:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89541 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetInstrInfo.h
lib/CodeGen/IfConversion.cpp

index 43fd54e183a99fc9c7b29f92695107a6feaac0a9..72ebe3cafac70f6f632e78868279ed00d2b02f92 100644 (file)
@@ -514,6 +514,13 @@ public:
     return false;
   }
 
+  /// isPredicable - Return true if the specified instruction can be predicated.
+  /// By default, this returns true for every instruction with a
+  /// PredicateOperand.
+  virtual bool isPredicable(MachineInstr *MI) const {
+    return MI->getDesc().isPredicable();
+  }
+
   /// isSafeToMoveRegClassDefs - Return true if it's safe to move a machine
   /// instruction that defines the specified register class.
   virtual bool isSafeToMoveRegClassDefs(const TargetRegisterClass *RC) const {
index 45f08b168a4965c6fb34bee7f94e46e93db74428..c23d7070a34e36aed5c4aa909d76a0ac6dd48a0a 100644 (file)
@@ -608,7 +608,7 @@ void IfConverter::ScanInstructions(BBInfo &BBI) {
     if (TII->DefinesPredicate(I, PredDefs))
       BBI.ClobbersPred = true;
 
-    if (!TID.isPredicable()) {
+    if (!TII->isPredicable(I)) {
       BBI.IsUnpredicable = true;
       return;
     }