add a new callback
authorChris Lattner <sabre@nondot.org>
Sat, 28 Jan 2006 03:37:03 +0000 (03:37 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 28 Jan 2006 03:37:03 +0000 (03:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25727 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index 7201079454e6b3433f5bac6683ae5c2ede6a2d6a..7f82eb675f3a7f845c6d8fa6598854da16ebcbc8 100644 (file)
@@ -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;
index 78db4554dae5408ec1bed2a491f4bf86356154e4..aa7659320d82a36f560bdf2fd70a28e95f746edb 100644 (file)
@@ -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 =