aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-07-04 11:47:58 +0000
committerDuncan Sands <baldrick@free.fr>2008-07-04 11:47:58 +0000
commitac496a17678473310a3c468a8ac5a5a30426876c (patch)
tree4bf58791eda553cebec7a8897d0abcad610325f9 /include/llvm
parentcbc28b1d8bceba8861692157c8725070cdb54a59 (diff)
downloadexternal_llvm-ac496a17678473310a3c468a8ac5a5a30426876c.zip
external_llvm-ac496a17678473310a3c468a8ac5a5a30426876c.tar.gz
external_llvm-ac496a17678473310a3c468a8ac5a5a30426876c.tar.bz2
Rather than having a different custom legalization
hook for each way in which a result type can be legalized (promotion, expansion, softening etc), just use one: ReplaceNodeResults, which returns a node with exactly the same result types as the node passed to it, but presumably with a bunch of custom code behind the scenes. No change if the new LegalizeTypes infrastructure is not turned on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Target/TargetLowering.h21
1 files changed, 8 insertions, 13 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index c66e0fa..559004a 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -1055,19 +1055,19 @@ public:
/// implement this. The default implementation of this aborts.
virtual SDOperand LowerOperation(SDOperand Op, SelectionDAG &DAG);
- /// ExpandOperationResult - This callback is invoked for operations that are
+ /// ReplaceNodeResults - 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. This must return a node whose
- /// results precisely match the results of the input node. This typically
- /// involves a MERGE_VALUES node and/or BUILD_PAIR.
+ /// and whose result type is illegal. This must return a node whose results
+ /// precisely match the results of the input node. This typically involves a
+ /// MERGE_VALUES node and/or BUILD_PAIR.
///
/// If the target has no operations that require custom lowering, it need not
- /// implement this. The default implementation of this aborts.
- virtual SDNode *ExpandOperationResult(SDNode *N, SelectionDAG &DAG) {
- assert(0 && "ExpandOperationResult not implemented for this target!");
+ /// implement this. The default implementation aborts.
+ virtual SDNode *ReplaceNodeResults(SDNode *N, SelectionDAG &DAG) {
+ assert(0 && "ReplaceNodeResults not implemented for this target!");
return 0;
}
-
+
/// IsEligibleForTailCallOptimization - Check whether the call is eligible for
/// tail call optimization. Targets which want to do tail call optimization
/// should override this function.
@@ -1107,11 +1107,6 @@ public:
return Chain;
}
- /// 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);
-
/// getTargetNodeName() - This method returns the name of a target specific
/// DAG node.
virtual const char *getTargetNodeName(unsigned Opcode) const;