Add some method variants, patch by Evan Cheng

llvm-svn: 24418
This commit is contained in:
Chris Lattner 2005-11-19 01:44:53 +00:00
parent e9a33d2505
commit 89056c7145

View File

@ -1399,6 +1399,7 @@ void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc); N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
N->setValueTypes(VT); N->setValueTypes(VT);
} }
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc, void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
MVT::ValueType VT, SDOperand Op1) { MVT::ValueType VT, SDOperand Op1) {
RemoveNodeFromCSEMaps(N); RemoveNodeFromCSEMaps(N);
@ -1406,6 +1407,7 @@ void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
N->setValueTypes(VT); N->setValueTypes(VT);
N->setOperands(Op1); N->setOperands(Op1);
} }
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc, void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
MVT::ValueType VT, SDOperand Op1, MVT::ValueType VT, SDOperand Op1,
SDOperand Op2) { SDOperand Op2) {
@ -1414,14 +1416,7 @@ void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
N->setValueTypes(VT); N->setValueTypes(VT);
N->setOperands(Op1, Op2); N->setOperands(Op1, Op2);
} }
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
MVT::ValueType VT1, MVT::ValueType VT2,
SDOperand Op1, SDOperand Op2) {
RemoveNodeFromCSEMaps(N);
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
setNodeValueTypes(N, VT1, VT2);
N->setOperands(Op1, Op2);
}
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc, void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
MVT::ValueType VT, SDOperand Op1, MVT::ValueType VT, SDOperand Op1,
SDOperand Op2, SDOperand Op3) { SDOperand Op2, SDOperand Op3) {
@ -1430,14 +1425,6 @@ void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
N->setValueTypes(VT); N->setValueTypes(VT);
N->setOperands(Op1, Op2, Op3); N->setOperands(Op1, Op2, 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);
setNodeValueTypes(N, VT1, VT2);
N->setOperands(Op1, Op2, Op3);
}
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc, void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
MVT::ValueType VT, SDOperand Op1, MVT::ValueType VT, SDOperand Op1,
@ -1447,6 +1434,7 @@ void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
N->setValueTypes(VT); N->setValueTypes(VT);
N->setOperands(Op1, Op2, Op3, Op4); N->setOperands(Op1, Op2, Op3, Op4);
} }
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc, void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
MVT::ValueType VT, SDOperand Op1, MVT::ValueType VT, SDOperand Op1,
SDOperand Op2, SDOperand Op3, SDOperand Op4, SDOperand Op2, SDOperand Op3, SDOperand Op4,
@ -1457,7 +1445,45 @@ void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
N->setOperands(Op1, Op2, Op3, Op4, Op5); N->setOperands(Op1, Op2, Op3, Op4, Op5);
} }
/// ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead. void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
MVT::ValueType VT1, MVT::ValueType VT2,
SDOperand Op1, SDOperand Op2) {
RemoveNodeFromCSEMaps(N);
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
setNodeValueTypes(N, VT1, VT2);
N->setOperands(Op1, Op2);
}
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);
setNodeValueTypes(N, VT1, VT2);
N->setOperands(Op1, Op2, Op3);
}
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
MVT::ValueType VT1, MVT::ValueType VT2,
SDOperand Op1, SDOperand Op2,
SDOperand Op3, SDOperand Op4) {
RemoveNodeFromCSEMaps(N);
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
setNodeValueTypes(N, VT1, VT2);
N->setOperands(Op1, Op2, Op3, Op4);
}
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
MVT::ValueType VT1, MVT::ValueType VT2,
SDOperand Op1, SDOperand Op2,
SDOperand Op3, SDOperand Op4, SDOperand Op5) {
RemoveNodeFromCSEMaps(N);
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
setNodeValueTypes(N, VT1, VT2);
N->setOperands(Op1, Op2, Op3, Op4, Op5);
}
// ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead.
/// This can cause recursive merging of nodes in the DAG. /// This can cause recursive merging of nodes in the DAG.
/// ///
/// This version assumes From/To have a single result value. /// This version assumes From/To have a single result value.