Start using SDVTList more consistently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29711 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp
index cd255ba..7cec545 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp
@@ -18,10 +18,16 @@
//===----------------------------------------------------------------------===//
// SelectionDAGCSEMap::NodeID Implementation
+/// SetValueTypes - Value type lists are intern'd so we can represent them
+/// solely with their pointer.
+void SelectionDAGCSEMap::NodeID::SetValueTypes(SDVTList VTList) {
+ AddPointer(VTList.VTs);
+}
+
SelectionDAGCSEMap::NodeID::NodeID(SDNode *N) {
SetOpcode(N->getOpcode());
// Add the return value info.
- SetValueTypes(N->value_begin());
+ SetValueTypes(N->getVTList());
// Add the operand info.
SetOperands(N->op_begin(), N->getNumOperands());
@@ -70,31 +76,31 @@
}
}
-SelectionDAGCSEMap::NodeID::NodeID(unsigned short ID, const void *VTList) {
+SelectionDAGCSEMap::NodeID::NodeID(unsigned short ID, SDVTList VTList) {
SetOpcode(ID);
SetValueTypes(VTList);
SetOperands();
}
-SelectionDAGCSEMap::NodeID::NodeID(unsigned short ID, const void *VTList,
+SelectionDAGCSEMap::NodeID::NodeID(unsigned short ID, SDVTList VTList,
SDOperand Op) {
SetOpcode(ID);
SetValueTypes(VTList);
SetOperands(Op);
}
-SelectionDAGCSEMap::NodeID::NodeID(unsigned short ID, const void *VTList,
+SelectionDAGCSEMap::NodeID::NodeID(unsigned short ID, SDVTList VTList,
SDOperand Op1, SDOperand Op2) {
SetOpcode(ID);
SetValueTypes(VTList);
SetOperands(Op1, Op2);
}
-SelectionDAGCSEMap::NodeID::NodeID(unsigned short ID, const void *VTList,
+SelectionDAGCSEMap::NodeID::NodeID(unsigned short ID, SDVTList VTList,
SDOperand Op1, SDOperand Op2,
SDOperand Op3) {
SetOpcode(ID);
SetValueTypes(VTList);
SetOperands(Op1, Op2, Op3);
}
-SelectionDAGCSEMap::NodeID::NodeID(unsigned short ID, const void *VTList,
+SelectionDAGCSEMap::NodeID::NodeID(unsigned short ID, SDVTList VTList,
const SDOperand *OpList, unsigned N) {
SetOpcode(ID);
SetValueTypes(VTList);