diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-02-08 22:13:59 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-02-08 22:13:59 +0000 |
commit | fa1eb27b76ab1e0f78574bf52a432c84a4c1a520 (patch) | |
tree | 8ba9b13c81e1d5a77fbff982749be700a0eb344c /include/llvm/Target/TargetLowering.h | |
parent | bb28a81ba3c112853f0eb3d8df0190accc0379c9 (diff) | |
download | external_llvm-fa1eb27b76ab1e0f78574bf52a432c84a4c1a520.zip external_llvm-fa1eb27b76ab1e0f78574bf52a432c84a4c1a520.tar.gz external_llvm-fa1eb27b76ab1e0f78574bf52a432c84a4c1a520.tar.bz2 |
Move SimplifySetCC to TargetLowering and allow it to be shared with legalizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34065 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetLowering.h')
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index bbd888d..7bdf01f 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -513,13 +513,15 @@ public: 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 @@ public: 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. |