[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h SelectionDAGCSEMap.h SelectionDAGNodes.h
Chris Lattner
lattner at cs.uiuc.edu
Tue Aug 15 12:11:22 PDT 2006
Changes in directory llvm/include/llvm/CodeGen:
SelectionDAG.h updated: 1.122 -> 1.123
SelectionDAGCSEMap.h updated: 1.6 -> 1.7
SelectionDAGNodes.h updated: 1.141 -> 1.142
---
Log message:
Start using SDVTList more consistently
---
Diffs of the changes: (+25 -18)
SelectionDAG.h | 9 ---------
SelectionDAGCSEMap.h | 13 +++++++------
SelectionDAGNodes.h | 21 ++++++++++++++++++---
3 files changed, 25 insertions(+), 18 deletions(-)
Index: llvm/include/llvm/CodeGen/SelectionDAG.h
diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.122 llvm/include/llvm/CodeGen/SelectionDAG.h:1.123
--- llvm/include/llvm/CodeGen/SelectionDAG.h:1.122 Tue Aug 15 12:46:01 2006
+++ llvm/include/llvm/CodeGen/SelectionDAG.h Tue Aug 15 14:11:05 2006
@@ -30,15 +30,6 @@
class MachineDebugInfo;
class MachineFunction;
-/// 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;
-};
-
/// SelectionDAG class - This is used to represent a portion of an LLVM function
/// in a low-level Data Dependence DAG representation suitable for instruction
/// selection. This DAG is constructed as the first step of instruction
Index: llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h:1.6 llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h:1.7
--- llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h:1.6 Mon Aug 14 17:19:25 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGCSEMap.h Tue Aug 15 14:11:05 2006
@@ -20,6 +20,7 @@
namespace llvm {
class SDNode;
class SDOperand;
+ struct SDVTList;
/// SelectionDAGCSEMap - This class is used for two purposes:
/// 1. Given information (e.g. opcode and operand info) about a node we want
@@ -68,13 +69,13 @@
public:
NodeID() {}
NodeID(SDNode *N);
- NodeID(unsigned short ID, const void *VTList);
- NodeID(unsigned short ID, const void *VTList, SDOperand Op);
- NodeID(unsigned short ID, const void *VTList,
+ NodeID(unsigned short ID, SDVTList VTList);
+ NodeID(unsigned short ID, SDVTList VTList, SDOperand Op);
+ NodeID(unsigned short ID, SDVTList VTList,
SDOperand Op1, SDOperand Op2);
- NodeID(unsigned short ID, const void *VTList,
+ NodeID(unsigned short ID, SDVTList VTList,
SDOperand Op1, SDOperand Op2, SDOperand Op3);
- NodeID(unsigned short ID, const void *VTList,
+ NodeID(unsigned short ID, SDVTList VTList,
const SDOperand *OpList, unsigned N);
void SetOpcode(unsigned short ID) {
@@ -87,7 +88,7 @@
return Bits[0];
}
- void SetValueTypes(const void *VTList) { AddPointer(VTList); }
+ void SetValueTypes(SDVTList VTList);
void SetOperands() {}
void SetOperands(SDOperand Op) { AddOperand(Op); }
void SetOperands(SDOperand Op1, SDOperand Op2) {
Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.141 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.142
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.141 Mon Aug 14 18:31:51 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Tue Aug 15 14:11:05 2006
@@ -38,6 +38,16 @@
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 @@
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 @@
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) {
More information about the llvm-commits
mailing list