[llvm-commits] [llvm] r42753 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAG.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Dan Gohman
djg at cray.com
Mon Oct 8 08:49:58 PDT 2007
Author: djg
Date: Mon Oct 8 10:49:58 2007
New Revision: 42753
URL: http://llvm.org/viewvc/llvm-project?rev=42753&view=rev
Log:
Add convenience overloads of SelectionDAG::getNode that take a SDVTList
and individual SDOperand operands.
Modified:
llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=42753&r1=42752&r2=42753&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Mon Oct 8 10:49:58 2007
@@ -287,6 +287,17 @@
const SDOperand *Ops, unsigned NumOps);
SDOperand getNode(unsigned Opcode, const MVT::ValueType *VTs, unsigned NumVTs,
const SDOperand *Ops, unsigned NumOps);
+ SDOperand getNode(unsigned Opcode, SDVTList VTs);
+ SDOperand getNode(unsigned Opcode, SDVTList VTs, SDOperand N);
+ SDOperand getNode(unsigned Opcode, SDVTList VTs,
+ SDOperand N1, SDOperand N2);
+ SDOperand getNode(unsigned Opcode, SDVTList VTs,
+ SDOperand N1, SDOperand N2, SDOperand N3);
+ SDOperand getNode(unsigned Opcode, SDVTList VTs,
+ SDOperand N1, SDOperand N2, SDOperand N3, SDOperand N4);
+ SDOperand getNode(unsigned Opcode, SDVTList VTs,
+ SDOperand N1, SDOperand N2, SDOperand N3, SDOperand N4,
+ SDOperand N5);
SDOperand getNode(unsigned Opcode, SDVTList VTs,
const SDOperand *Ops, unsigned NumOps);
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=42753&r1=42752&r2=42753&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Oct 8 10:49:58 2007
@@ -2595,6 +2595,42 @@
return SDOperand(N, 0);
}
+SDOperand SelectionDAG::getNode(unsigned Opcode, SDVTList VTList) {
+ return getNode(Opcode, VTList, 0, 0);
+}
+
+SDOperand SelectionDAG::getNode(unsigned Opcode, SDVTList VTList,
+ SDOperand N1) {
+ SDOperand Ops[] = { N1 };
+ return getNode(Opcode, VTList, Ops, 1);
+}
+
+SDOperand SelectionDAG::getNode(unsigned Opcode, SDVTList VTList,
+ SDOperand N1, SDOperand N2) {
+ SDOperand Ops[] = { N1, N2 };
+ return getNode(Opcode, VTList, Ops, 2);
+}
+
+SDOperand SelectionDAG::getNode(unsigned Opcode, SDVTList VTList,
+ SDOperand N1, SDOperand N2, SDOperand N3) {
+ SDOperand Ops[] = { N1, N2, N3 };
+ return getNode(Opcode, VTList, Ops, 3);
+}
+
+SDOperand SelectionDAG::getNode(unsigned Opcode, SDVTList VTList,
+ SDOperand N1, SDOperand N2, SDOperand N3,
+ SDOperand N4) {
+ SDOperand Ops[] = { N1, N2, N3, N4 };
+ return getNode(Opcode, VTList, Ops, 4);
+}
+
+SDOperand SelectionDAG::getNode(unsigned Opcode, SDVTList VTList,
+ SDOperand N1, SDOperand N2, SDOperand N3,
+ SDOperand N4, SDOperand N5) {
+ SDOperand Ops[] = { N1, N2, N3, N4, N5 };
+ return getNode(Opcode, VTList, Ops, 5);
+}
+
SDVTList SelectionDAG::getVTList(MVT::ValueType VT) {
if (!MVT::isExtendedVT(VT))
return makeVTList(SDNode::getValueTypeList(VT), 1);
More information about the llvm-commits
mailing list