[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Aug 26 09:36:37 PDT 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAG.cpp updated: 1.168 -> 1.169
---
Log message:
Fix a huge annoyance: SelectNodeTo took types before the opcode unlike
every other SD API. Fix it to take the opcode before the types.
---
Diffs of the changes: (+17 -19)
SelectionDAG.cpp | 36 +++++++++++++++++-------------------
1 files changed, 17 insertions(+), 19 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.168 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.169
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.168 Thu Aug 25 19:13:12 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Fri Aug 26 11:36:26 2005
@@ -1942,64 +1942,62 @@
/// specified node to have the specified return type, Target opcode, and
/// operands. Note that target opcodes are stored as
/// ISD::BUILTIN_OP_END+TargetOpcode in the node opcode field.
-void SelectionDAG::SelectNodeTo(SDNode *N, MVT::ValueType VT,
- unsigned TargetOpc) {
+void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
+ MVT::ValueType VT) {
RemoveNodeFromCSEMaps(N);
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
N->setValueTypes(VT);
}
-void SelectionDAG::SelectNodeTo(SDNode *N, MVT::ValueType VT,
- unsigned TargetOpc, SDOperand Op1) {
+void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
+ MVT::ValueType VT, SDOperand Op1) {
RemoveNodeFromCSEMaps(N);
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
N->setValueTypes(VT);
N->setOperands(Op1);
}
-void SelectionDAG::SelectNodeTo(SDNode *N, MVT::ValueType VT,
- unsigned TargetOpc, SDOperand Op1,
+void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
+ MVT::ValueType VT, SDOperand Op1,
SDOperand Op2) {
RemoveNodeFromCSEMaps(N);
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
N->setValueTypes(VT);
N->setOperands(Op1, Op2);
}
-void SelectionDAG::SelectNodeTo(SDNode *N,
+void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
MVT::ValueType VT1, MVT::ValueType VT2,
- unsigned TargetOpc, SDOperand Op1,
- SDOperand Op2) {
+ SDOperand Op1, SDOperand Op2) {
RemoveNodeFromCSEMaps(N);
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
N->setValueTypes(VT1, VT2);
N->setOperands(Op1, Op2);
}
-void SelectionDAG::SelectNodeTo(SDNode *N, MVT::ValueType VT,
- unsigned TargetOpc, SDOperand Op1,
+void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
+ MVT::ValueType VT, SDOperand Op1,
SDOperand Op2, SDOperand Op3) {
RemoveNodeFromCSEMaps(N);
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
N->setValueTypes(VT);
N->setOperands(Op1, Op2, Op3);
}
-void SelectionDAG::SelectNodeTo(SDNode *N, MVT::ValueType VT1,
- MVT::ValueType VT2,
- unsigned TargetOpc, SDOperand Op1,
- SDOperand Op2, SDOperand Op3) {
+void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
+ MVT::ValueType VT1, MVT::ValueType VT2,
+ SDOperand Op1, SDOperand Op2, SDOperand Op3) {
RemoveNodeFromCSEMaps(N);
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
N->setValueTypes(VT1, VT2);
N->setOperands(Op1, Op2, Op3);
}
-void SelectionDAG::SelectNodeTo(SDNode *N, MVT::ValueType VT,
- unsigned TargetOpc, SDOperand Op1,
+void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
+ MVT::ValueType VT, SDOperand Op1,
SDOperand Op2, SDOperand Op3, SDOperand Op4) {
RemoveNodeFromCSEMaps(N);
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
N->setValueTypes(VT);
N->setOperands(Op1, Op2, Op3, Op4);
}
-void SelectionDAG::SelectNodeTo(SDNode *N, MVT::ValueType VT,
- unsigned TargetOpc, SDOperand Op1,
+void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
+ MVT::ValueType VT, SDOperand Op1,
SDOperand Op2, SDOperand Op3, SDOperand Op4,
SDOperand Op5) {
RemoveNodeFromCSEMaps(N);
More information about the llvm-commits
mailing list