[llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h

Evan Cheng evan.cheng at apple.com
Thu Feb 8 14:14:21 PST 2007



Changes in directory llvm/include/llvm/Target:

TargetLowering.h updated: 1.106 -> 1.107
---
Log message:

Move SimplifySetCC to TargetLowering and allow it to be shared with legalizer.

---
Diffs of the changes:  (+10 -2)

 TargetLowering.h |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/Target/TargetLowering.h
diff -u llvm/include/llvm/Target/TargetLowering.h:1.106 llvm/include/llvm/Target/TargetLowering.h:1.107
--- llvm/include/llvm/Target/TargetLowering.h:1.106	Thu Feb  1 02:39:52 2007
+++ llvm/include/llvm/Target/TargetLowering.h	Thu Feb  8 16:13:59 2007
@@ -513,13 +513,15 @@
   struct DAGCombinerInfo {
     void *DC;  // The DAG Combiner object.
     bool BeforeLegalize;
+    bool CalledByLegalizer;
   public:
     SelectionDAG &DAG;
     
-    DAGCombinerInfo(SelectionDAG &dag, bool bl, void *dc)
-      : DC(dc), BeforeLegalize(bl), DAG(dag) {}
+    DAGCombinerInfo(SelectionDAG &dag, bool bl, bool cl, void *dc)
+      : DC(dc), BeforeLegalize(bl), CalledByLegalizer(cl), DAG(dag) {}
     
     bool isBeforeLegalize() const { return BeforeLegalize; }
+    bool isCalledByLegalizer() const { return CalledByLegalizer; }
     
     void AddToWorklist(SDNode *N);
     SDOperand CombineTo(SDNode *N, const std::vector<SDOperand> &To);
@@ -527,6 +529,12 @@
     SDOperand CombineTo(SDNode *N, SDOperand Res0, SDOperand Res1);
   };
 
+  /// SimplifySetCC - Try to simplify a setcc built with the specified operands 
+  /// and cc. If it is unable to simplify it, return a null SDOperand.
+  SDOperand SimplifySetCC(MVT::ValueType VT, SDOperand N0, SDOperand N1,
+                          ISD::CondCode Cond, bool foldBooleans,
+                          DAGCombinerInfo &DCI) const;
+
   /// PerformDAGCombine - This method will be invoked for all target nodes and
   /// for any target-independent nodes that the target has registered with
   /// invoke it for.






More information about the llvm-commits mailing list