diff options
author | Chris Lattner <sabre@nondot.org> | 2006-08-15 19:11:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-08-15 19:11:05 +0000 |
commit | 0b3e525a3a6b55b66dc5676675712b26e4c1ed9f (patch) | |
tree | 0954a8442200e132cb2204510a00977ecb70c62d /lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp | |
parent | 70046e920fa37989a041af663ada2b2b646e258f (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 'lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp index cd255ba327..7cec545f5d 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGCSEMap.cpp @@ -18,10 +18,16 @@ using namespace llvm; //===----------------------------------------------------------------------===// // 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(SDNode *N) { } } -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); |