diff options
author | Chris Lattner <sabre@nondot.org> | 2006-01-28 03:37:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-01-28 03:37:03 +0000 |
commit | 4f16e70faad0840357998059f7f296e5f5e412be (patch) | |
tree | cb444ecfda1b996636a2f4462b2c82e5a5071e5e | |
parent | 0aed7840ec8cc85f91b4aa6e69318bba0cbd1f03 (diff) |
add a new callback
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25727 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 17 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 7 |
2 files changed, 19 insertions, 5 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index 7201079454..7f82eb675f 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -368,17 +368,24 @@ public: LowerFrameReturnAddress(bool isFrameAddr, SDOperand Chain, unsigned Depth, SelectionDAG &DAG); - /// LowerOperation - For operations that are unsupported by the target, and - /// which are registered to use 'custom' lowering, this callback is invoked. + /// LowerOperation - This callback is invoked for operations that are + /// unsupported by the target, which are registered to use 'custom' lowering, + /// and whose defined values are all legal. /// If the target has no operations that require custom lowering, it need not /// implement this. The default implementation of this aborts. virtual SDOperand LowerOperation(SDOperand Op, SelectionDAG &DAG); - /// CustomPromoteOperation - For operations that are unsupported by the - /// target, are registered to use 'custom' lowering, and whose type needs to - /// be promoted, this callback is invoked. + /// CustomPromoteOperation - This callback is invoked for operations that are + /// unsupported by the target, are registered to use 'custom' lowering, and + /// whose type needs to be promoted. virtual SDOperand CustomPromoteOperation(SDOperand Op, SelectionDAG &DAG); + /// CustomExpandOperation - This callback is invoked for operations that are + /// unsupported by the target, are registered to use 'custom' lowering, and + /// whose type needs to be expanded. + virtual void CustomExpandOperation(SDOperand Op, SDOperand &Lo, SDOperand &Hi, + SelectionDAG &DAG); + /// getTargetNodeName() - This method returns the name of a target specific /// DAG node. virtual const char *getTargetNodeName(unsigned Opcode) const; diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 78db4554da..aa7659320d 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -1288,6 +1288,13 @@ SDOperand TargetLowering::CustomPromoteOperation(SDOperand Op, return SDOperand(); } +void TargetLowering::CustomExpandOperation(SDOperand Op, SDOperand &Lo, + SDOperand &Hi, SelectionDAG &DAG) { + assert(0 && "CustomExpandOperation not implemented for this target!"); + abort(); + return SDOperand(); +} + void SelectionDAGLowering::visitFrameReturnAddress(CallInst &I, bool isFrame) { unsigned Depth = (unsigned)cast<ConstantUInt>(I.getOperand(1))->getValue(); std::pair<SDOperand,SDOperand> Result = |