From 1c4d492b944768ded5356587779045cc346409d7 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 19 Oct 2007 15:28:47 +0000 Subject: [PATCH] rename ExpandOperation to ExpandOperationResult, as suggested by Duncan git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43177 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetLowering.h | 4 ++-- lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp | 17 +---------------- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 2 +- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index 48f3d7c016c..d55a8af7227 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -885,14 +885,14 @@ public: /// 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 - 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 diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp index 82a91babe57..f7d3d2555f7 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAGTypes.cpp @@ -618,8 +618,7 @@ void DAGTypeLegalizer::ExpandResult(SDNode *N, unsigned ResNo) { TLI.getOperationAction(N->getOpcode(), N->getValueType(0)) == TargetLowering::Custom) { // If the target wants to, allow it to lower this itself. - std::pair P = - TLI.ExpandOperation(SDOperand(N, 0), DAG); + std::pair P = TLI.ExpandOperationResult(N, DAG); if (P.first.Val) { Lo = P.first; Hi = P.second; @@ -852,20 +851,6 @@ void DAGTypeLegalizer::ExpandResult_SELECT_CC(SDNode *N, 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 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); diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index f69b0959400..610c898d170 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -4135,7 +4135,7 @@ SDOperand TargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) { } std::pair -TargetLowering::ExpandOperation(SDOperand Op, SelectionDAG &DAG) { +TargetLowering::ExpandOperationResult(SDNode *N, SelectionDAG &DAG) { assert(0 && "ExpandOperation not implemented for this target!"); abort(); return std::pair();