[llvm-commits] [llvm] r38495 - /llvm/trunk/lib/CodeGen/IfConversion.cpp

Evan Cheng evan.cheng at apple.com
Tue Jul 10 10:50:44 PDT 2007


Author: evancheng
Date: Tue Jul 10 12:50:43 2007
New Revision: 38495

URL: http://llvm.org/viewvc/llvm-project?rev=38495&view=rev
Log:
Somehow this wasn't committed last time. M_CLOBBERS_PRED is gone.

Modified:
    llvm/trunk/lib/CodeGen/IfConversion.cpp

Modified: llvm/trunk/lib/CodeGen/IfConversion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/IfConversion.cpp?rev=38495&r1=38494&r2=38495&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/IfConversion.cpp (original)
+++ llvm/trunk/lib/CodeGen/IfConversion.cpp Tue Jul 10 12:50:43 2007
@@ -84,7 +84,7 @@
     /// IsBrAnalyzable  - True if AnalyzeBranch() returns false.
     /// HasFallThrough  - True if BB may fallthrough to the following BB.
     /// IsUnpredicable  - True if BB is known to be unpredicable.
-    /// ClobbersPredicate- True if BB would modify the predicate (e.g. has
+    /// ClobbersPred    - True if BB could modify predicates (e.g. has
     ///                   cmp, call, etc.)
     /// NonPredSize     - Number of non-predicated instructions.
     /// BB              - Corresponding MachineBasicBlock.
@@ -588,7 +588,10 @@
       return;
     }
 
-    if (TID->Flags & M_CLOBBERS_PRED)
+    // FIXME: Make use of PredDefs? e.g. ADDC, SUBC sets predicates but are
+    // still potentially predicable.
+    std::vector<MachineOperand> PredDefs;
+    if (TII->DefinesPredicate(I, PredDefs))
       BBI.ClobbersPred = true;
 
     if ((TID->Flags & M_PREDICABLE) == 0) {





More information about the llvm-commits mailing list