add a new target hook.
authorChris Lattner <sabre@nondot.org>
Fri, 19 Oct 2007 03:31:45 +0000 (03:31 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 19 Oct 2007 03:31:45 +0000 (03:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43165 91177308-0d34-0410-b5e6-96231b3b80d8

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

index e7e99a7f74435a6a189d356013642525c3ea46aa..48f3d7c016c4520c5634fd5439d940b4f1ff6c96 100644 (file)
@@ -885,6 +885,15 @@ 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 
+  /// 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);
+  
   /// IsEligibleForTailCallOptimization - Check whether the call is eligible for
   /// tail call optimization. Targets which want to do tail call optimization
   /// should override this function. 
index e2276cd8292780f7b4162ea5b91ba57e92139ddb..a5b6300f6e3e5c15efc74cb5d964e4e6f3474dc9 100644 (file)
@@ -4134,6 +4134,14 @@ SDOperand TargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) {
   return SDOperand();
 }
 
+std::pair<SDOperand,SDOperand>
+TargetLowering::ExpandOperation(SDOperand Op, SelectionDAG &DAG) {
+  assert(0 && "ExpandOperation not implemented for this target!");
+  abort();
+  return std::pair<SDOperand,SDOperand>();
+}
+
+
 SDOperand TargetLowering::CustomPromoteOperation(SDOperand Op,
                                                  SelectionDAG &DAG) {
   assert(0 && "CustomPromoteOperation not implemented for this target!");