[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp SelectionDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat May 14 00:46:01 PDT 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.128 -> 1.129
SelectionDAG.cpp updated: 1.117 -> 1.118
---
Log message:
remove special case hacks for readport/readio from the binary operator
codepath
---
Diffs of the changes: (+15 -13)
LegalizeDAG.cpp | 21 ++++++++++++++-------
SelectionDAG.cpp | 7 +------
2 files changed, 15 insertions(+), 13 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.128 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.129
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.128 Sat May 14 02:29:57 2005
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Sat May 14 02:45:46 2005
@@ -977,9 +977,13 @@
Tmp1 = LegalizeOp(Node->getOperand(0));
Tmp2 = LegalizeOp(Node->getOperand(1));
- if (Tmp1 != Node->getOperand(0) || Tmp2 != Node->getOperand(1))
- Result = DAG.getNode(ISD::READPORT, Node->getValueType(0), Tmp1, Tmp2);
- else
+ if (Tmp1 != Node->getOperand(0) || Tmp2 != Node->getOperand(1)) {
+ std::vector<MVT::ValueType> VTs(Node->value_begin(), Node->value_end());
+ std::vector<SDOperand> Ops;
+ Ops.push_back(Tmp1);
+ Ops.push_back(Tmp2);
+ Result = DAG.getNode(ISD::READPORT, VTs, Ops);
+ } else
Result = SDOperand(Node, 0);
// Since these produce two values, make sure to remember that we legalized
// both of them.
@@ -1003,10 +1007,13 @@
case TargetLowering::Custom:
default: assert(0 && "This action not implemented for this operation!");
case TargetLowering::Legal:
- if (Tmp1 != Node->getOperand(0) || Tmp2 != Node->getOperand(1))
- Result = DAG.getNode(Node->getOpcode(), Node->getValueType(0),
- Tmp1, Tmp2);
- else
+ if (Tmp1 != Node->getOperand(0) || Tmp2 != Node->getOperand(1)) {
+ std::vector<MVT::ValueType> VTs(Node->value_begin(), Node->value_end());
+ std::vector<SDOperand> Ops;
+ Ops.push_back(Tmp1);
+ Ops.push_back(Tmp2);
+ Result = DAG.getNode(ISD::READPORT, VTs, Ops);
+ } else
Result = SDOperand(Node, 0);
break;
case TargetLowering::Expand:
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.117 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.118
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.117 Sat May 14 02:42:29 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sat May 14 02:45:46 2005
@@ -1215,12 +1215,7 @@
N = new SDNode(Opcode, N1, N2);
}
-
- if (Opcode != ISD::READPORT && Opcode != ISD::READIO)
- N->setValueTypes(VT);
- else
- N->setValueTypes(VT, MVT::Other);
-
+ N->setValueTypes(VT);
AllNodes.push_back(N);
return SDOperand(N, 0);
}
More information about the llvm-commits
mailing list