[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp SelectionDAG.cpp SelectionDAGISel.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Mar 27 16:40:21 PST 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.340 -> 1.341
SelectionDAG.cpp updated: 1.289 -> 1.290
SelectionDAGISel.cpp updated: 1.209 -> 1.210
---
Log message:
Tblgen doesn't like multiple SDNode<> definitions that map to the sameenum value. Split them into separate enums.
---
Diffs of the changes: (+19 -7)
LegalizeDAG.cpp | 6 ++++--
SelectionDAG.cpp | 10 +++++++---
SelectionDAGISel.cpp | 10 ++++++++--
3 files changed, 19 insertions(+), 7 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.340 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.341
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.340 Mon Mar 27 14:28:29 2006
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Mar 27 18:40:09 2006
@@ -553,14 +553,16 @@
break;
}
- case ISD::INTRINSIC: {
+ case ISD::INTRINSIC_W_CHAIN:
+ case ISD::INTRINSIC_WO_CHAIN:
+ case ISD::INTRINSIC_VOID: {
std::vector<SDOperand> Ops;
for (unsigned i = 0, e = Node->getNumOperands(); i != e; ++i)
Ops.push_back(LegalizeOp(Node->getOperand(i)));
Result = DAG.UpdateNodeOperands(Result, Ops);
// Allow the target to custom lower its intrinsics if it wants to.
- if (TLI.getOperationAction(ISD::INTRINSIC, MVT::Other) ==
+ if (TLI.getOperationAction(Node->getOpcode(), MVT::Other) ==
TargetLowering::Custom) {
Tmp3 = TLI.LowerOperation(Result, DAG);
if (Tmp3.Val) Result = Tmp3;
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.289 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.290
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.289 Mon Mar 27 10:10:59 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Mar 27 18:40:09 2006
@@ -2689,9 +2689,13 @@
case ISD::FrameIndex: return "FrameIndex";
case ISD::ConstantPool: return "ConstantPool";
case ISD::ExternalSymbol: return "ExternalSymbol";
- case ISD::INTRINSIC: {
- bool hasChain = getOperand(0).getValueType() == MVT::Other;
- unsigned IID = cast<ConstantSDNode>(getOperand(hasChain))->getValue();
+ case ISD::INTRINSIC_WO_CHAIN: {
+ unsigned IID = cast<ConstantSDNode>(getOperand(0))->getValue();
+ return Intrinsic::getName((Intrinsic::ID)IID);
+ }
+ case ISD::INTRINSIC_VOID:
+ case ISD::INTRINSIC_W_CHAIN: {
+ unsigned IID = cast<ConstantSDNode>(getOperand(1))->getValue();
return Intrinsic::getName((Intrinsic::ID)IID);
}
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.209 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.210
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.209 Mon Mar 27 17:31:10 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Mar 27 18:40:09 2006
@@ -1261,8 +1261,14 @@
VTs.push_back(MVT::Other);
// Create the node.
- SDOperand Result = DAG.getNode(ISD::INTRINSIC, VTs, Ops);
-
+ SDOperand Result;
+ if (!HasChain)
+ Result = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, VTs, Ops);
+ else if (I.getType() != Type::VoidTy)
+ Result = DAG.getNode(ISD::INTRINSIC_W_CHAIN, VTs, Ops);
+ else
+ Result = DAG.getNode(ISD::INTRINSIC_VOID, VTs, Ops);
+
if (HasChain)
DAG.setRoot(Result.getValue(Result.Val->getNumValues()-1));
if (I.getType() != Type::VoidTy) {
More information about the llvm-commits
mailing list