[llvm-commits] [llvm] r43165 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Chris Lattner
sabre at nondot.org
Thu Oct 18 20:31:45 PDT 2007
Author: lattner
Date: Thu Oct 18 22:31:45 2007
New Revision: 43165
URL: http://llvm.org/viewvc/llvm-project?rev=43165&view=rev
Log:
add a new target hook.
Modified:
llvm/trunk/include/llvm/Target/TargetLowering.h
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=43165&r1=43164&r2=43165&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetLowering.h (original)
+++ llvm/trunk/include/llvm/Target/TargetLowering.h Thu Oct 18 22:31:45 2007
@@ -885,6 +885,15 @@
/// 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.
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=43165&r1=43164&r2=43165&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu Oct 18 22:31:45 2007
@@ -4134,6 +4134,14 @@
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!");
More information about the llvm-commits
mailing list