aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/SelectionDAGNodes.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-08-15 19:11:05 +0000
committerChris Lattner <sabre@nondot.org>2006-08-15 19:11:05 +0000
commit0b3e525a3a6b55b66dc5676675712b26e4c1ed9f (patch)
tree0954a8442200e132cb2204510a00977ecb70c62d /include/llvm/CodeGen/SelectionDAGNodes.h
parent70046e920fa37989a041af663ada2b2b646e258f (diff)
Start using SDVTList more consistently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29711 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index 86c8d2e5ff..4ee389b848 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -38,6 +38,16 @@ template <typename T> struct ilist_traits;
template<typename NodeTy, typename Traits> class iplist;
template<typename NodeTy> class ilist_iterator;
+/// SDVTList - This represents a list of ValueType's that has been intern'd by
+/// a SelectionDAG. Instances of this simple value class are returned by
+/// SelectionDAG::getVTList(...).
+///
+struct SDVTList {
+ const MVT::ValueType *VTs;
+ unsigned short NumVTs;
+};
+
+
/// ISD namespace - This namespace contains an enum which represents all of the
/// SelectionDAG node types and value types.
///
@@ -769,6 +779,11 @@ public:
op_iterator op_end() const { return OperandList+NumOperands; }
+ SDVTList getVTList() const {
+ SDVTList X = { ValueList, NumValues };
+ return X;
+ };
+
/// getNumValues - Return the number of values defined/returned by this
/// operator.
///
@@ -899,10 +914,10 @@ protected:
NumOperands = 0;
}
- void setValueTypes(const MVT::ValueType *List, unsigned NumVal) {
+ void setValueTypes(SDVTList L) {
assert(NumValues == 0 && "Should not have values yet!");
- ValueList = List;
- NumValues = NumVal;
+ ValueList = L.VTs;
+ NumValues = L.NumVTs;
}
void setOperands(SDOperand Op0) {