[llvm-commits] [llvm] r43177 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Chris Lattner sabre at nondot.org
Fri Oct 19 08:28:48 PDT 2007


Author: lattner
Date: Fri Oct 19 10:28:47 2007
New Revision: 43177

URL: http://llvm.org/viewvc/llvm-project?rev=43177&view=rev
Log:
rename ExpandOperation to ExpandOperationResult, as suggested
by Duncan

Modified:
    llvm/trunk/include/llvm/Target/TargetLowering.h
    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Modified: llvm/trunk/include/llvm/Target/TargetLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=43177&r1=43176&r2=43177&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Target/TargetLowering.h (original)
+++ llvm/trunk/include/llvm/Target/TargetLowering.h Fri Oct 19 10:28:47 2007
@@ -885,14 +885,14 @@
   /// implement this.  The default implementation of this aborts.
   virtual SDOperand LowerOperation(SDOperand Op, SelectionDAG &DAG);
 
-  /// ExpandOperation - This callback is invoked for operations that are 
+  /// ExpandOperationResult - This callback is invoked for operations that are 
   /// unsupported by the target, which are registered to use 'custom' lowering,
   /// and whose result type needs to be expanded.
   ///
   /// If the target has no operations that require custom lowering, it need not
   /// implement this.  The default implementation of this aborts.
   virtual std::pair<SDOperand,SDOperand> 
-    ExpandOperation(SDOperand Op, SelectionDAG &DAG);
+    ExpandOperationResult(SDNode *N, SelectionDAG &DAG);
   
   /// IsEligibleForTailCallOptimization - Check whether the call is eligible for
   /// tail call optimization. Targets which want to do tail call optimization

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp?rev=43177&r1=43176&r2=43177&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp Fri Oct 19 10:28:47 2007
@@ -618,8 +618,7 @@
       TLI.getOperationAction(N->getOpcode(),
                              N->getValueType(0)) == TargetLowering::Custom) {
     // If the target wants to, allow it to lower this itself.
-    std::pair<SDOperand,SDOperand> P =
-      TLI.ExpandOperation(SDOperand(N, 0), DAG);
+    std::pair<SDOperand,SDOperand> P = TLI.ExpandOperationResult(N, DAG);
     if (P.first.Val) {
       Lo = P.first;
       Hi = P.second;
@@ -852,20 +851,6 @@
 
 void DAGTypeLegalizer::ExpandResult_ADDSUB(SDNode *N,
                                            SDOperand &Lo, SDOperand &Hi) {
-  MVT::ValueType VT = N->getValueType(0);
-  
-  // If the target wants to custom expand this, let them.
-  if (TLI.getOperationAction(N->getOpcode(), VT) ==
-      TargetLowering::Custom) {
-    std::pair<SDOperand,SDOperand> Ret = 
-      TLI.ExpandOperation(SDOperand(N, 0), DAG);
-    if (Ret.first.Val) {
-      Lo = Ret.first;
-      Hi = Ret.second;
-      return;
-    }
-  }
-  
   // Expand the subcomponents.
   SDOperand LHSL, LHSH, RHSL, RHSH;
   GetExpandedOp(N->getOperand(0), LHSL, LHSH);

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=43177&r1=43176&r2=43177&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Fri Oct 19 10:28:47 2007
@@ -4135,7 +4135,7 @@
 }
 
 std::pair<SDOperand,SDOperand>
-TargetLowering::ExpandOperation(SDOperand Op, SelectionDAG &DAG) {
+TargetLowering::ExpandOperationResult(SDNode *N, SelectionDAG &DAG) {
   assert(0 && "ExpandOperation not implemented for this target!");
   abort();
   return std::pair<SDOperand,SDOperand>();





More information about the llvm-commits mailing list