summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-05-14 07:32:14 +0000
committerChris Lattner <sabre@nondot.org>2005-05-14 07:32:14 +0000
commitb7f7d514220693728b90dfc8293b964fadd58df2 (patch)
tree37906cf5b8903a9227c0911b98caf8adb21f77b9 /lib
parentadf6c2a0cb638e8b211200b57b927d16f6e1cfc4 (diff)
downloadllvm-b7f7d514220693728b90dfc8293b964fadd58df2.tar.gz
llvm-b7f7d514220693728b90dfc8293b964fadd58df2.tar.bz2
llvm-b7f7d514220693728b90dfc8293b964fadd58df2.tar.xz
Turn this into a wrapper for a simpler version of getNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22016 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 3643f77f93..d95b387ead 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -1359,14 +1359,13 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
SDOperand N1, SDOperand N2, SDOperand N3,
SDOperand N4) {
- assert(Opcode == ISD::STORE && "Only stores should use this");
-
- SDNode *N = new SDNode(Opcode, N1, N2, N3, N4);
- N->setValueTypes(VT);
-
- // FIXME: memoize NODES
- AllNodes.push_back(N);
- return SDOperand(N, 0);
+ std::vector<SDOperand> Ops;
+ Ops.reserve(4);
+ Ops.push_back(N1);
+ Ops.push_back(N2);
+ Ops.push_back(N3);
+ Ops.push_back(N4);
+ return getNode(Opcode, VT, Ops);
}
SDOperand SelectionDAG::getSrcValue(const Value *V, int Offset) {