mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 23:18:51 +00:00
Make SelectNodeTo return N
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24548 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
80720a9219
commit
eb19e40efb
@ -20,7 +20,7 @@
|
||||
|
||||
#include <map>
|
||||
#include <list>
|
||||
#include <string> // FIXME remove eventually, turning map into const char* map.
|
||||
#include <string>
|
||||
|
||||
namespace llvm {
|
||||
class TargetLowering;
|
||||
@ -272,33 +272,35 @@ public:
|
||||
/// SelectNodeTo - These are used for target selectors to *mutate* the
|
||||
/// 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 SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT);
|
||||
void SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT,
|
||||
SDOperand Op1);
|
||||
void SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT,
|
||||
SDOperand Op1, SDOperand Op2);
|
||||
void SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT,
|
||||
SDOperand Op1, SDOperand Op2, SDOperand Op3);
|
||||
void SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT,
|
||||
SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4);
|
||||
void SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT,
|
||||
SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4,
|
||||
SDOperand Op5);
|
||||
void SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT,
|
||||
SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4,
|
||||
SDOperand Op5, SDOperand Op6);
|
||||
void SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT1,
|
||||
MVT::ValueType VT2, SDOperand Op1, SDOperand Op2);
|
||||
void SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT1,
|
||||
MVT::ValueType VT2, SDOperand Op1, SDOperand Op2,
|
||||
SDOperand Op3);
|
||||
void SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT1,
|
||||
MVT::ValueType VT2, SDOperand Op1, SDOperand Op2,
|
||||
SDOperand Op3, SDOperand Op4);
|
||||
void SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT1,
|
||||
MVT::ValueType VT2, SDOperand Op1, SDOperand Op2,
|
||||
SDOperand Op3, SDOperand Op4, SDOperand Op5);
|
||||
/// ISD::BUILTIN_OP_END+TargetOpcode in the node opcode field. The 0th value
|
||||
/// of the resultant node is returned.
|
||||
SDOperand SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT);
|
||||
SDOperand SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT,
|
||||
SDOperand Op1);
|
||||
SDOperand SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT,
|
||||
SDOperand Op1, SDOperand Op2);
|
||||
SDOperand SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT,
|
||||
SDOperand Op1, SDOperand Op2, SDOperand Op3);
|
||||
SDOperand SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT,
|
||||
SDOperand Op1, SDOperand Op2, SDOperand Op3,
|
||||
SDOperand Op4);
|
||||
SDOperand SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT,
|
||||
SDOperand Op1, SDOperand Op2, SDOperand Op3,
|
||||
SDOperand Op4, SDOperand Op5);
|
||||
SDOperand SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT,
|
||||
SDOperand Op1, SDOperand Op2, SDOperand Op3,
|
||||
SDOperand Op4, SDOperand Op5, SDOperand Op6);
|
||||
SDOperand SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT1,
|
||||
MVT::ValueType VT2, SDOperand Op1, SDOperand Op2);
|
||||
SDOperand SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT1,
|
||||
MVT::ValueType VT2, SDOperand Op1, SDOperand Op2,
|
||||
SDOperand Op3);
|
||||
SDOperand SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT1,
|
||||
MVT::ValueType VT2, SDOperand Op1, SDOperand Op2,
|
||||
SDOperand Op3, SDOperand Op4);
|
||||
SDOperand SelectNodeTo(SDNode *N, unsigned TargetOpc, MVT::ValueType VT1,
|
||||
MVT::ValueType VT2, SDOperand Op1, SDOperand Op2,
|
||||
SDOperand Op3, SDOperand Op4, SDOperand Op5);
|
||||
|
||||
SDOperand getTargetNode(unsigned Opcode, MVT::ValueType VT) {
|
||||
return getNode(ISD::BUILTIN_OP_END+Opcode, VT);
|
||||
|
@ -1415,104 +1415,118 @@ void SelectionDAG::setNodeValueTypes(SDNode *N, MVT::ValueType VT1,
|
||||
/// 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, unsigned TargetOpc,
|
||||
MVT::ValueType VT) {
|
||||
SDOperand SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
|
||||
MVT::ValueType VT) {
|
||||
RemoveNodeFromCSEMaps(N);
|
||||
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
|
||||
N->setValueTypes(VT);
|
||||
return SDOperand(N, 0);
|
||||
}
|
||||
|
||||
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
|
||||
MVT::ValueType VT, SDOperand Op1) {
|
||||
SDOperand 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);
|
||||
return SDOperand(N, 0);
|
||||
}
|
||||
|
||||
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
|
||||
MVT::ValueType VT, SDOperand Op1,
|
||||
SDOperand Op2) {
|
||||
SDOperand 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);
|
||||
return SDOperand(N, 0);
|
||||
}
|
||||
|
||||
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
|
||||
MVT::ValueType VT, SDOperand Op1,
|
||||
SDOperand Op2, SDOperand Op3) {
|
||||
SDOperand 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);
|
||||
return SDOperand(N, 0);
|
||||
}
|
||||
|
||||
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
|
||||
MVT::ValueType VT, SDOperand Op1,
|
||||
SDOperand Op2, SDOperand Op3, SDOperand Op4) {
|
||||
SDOperand 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);
|
||||
return SDOperand(N, 0);
|
||||
}
|
||||
|
||||
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
|
||||
MVT::ValueType VT, SDOperand Op1,
|
||||
SDOperand Op2, SDOperand Op3, SDOperand Op4,
|
||||
SDOperand Op5) {
|
||||
SDOperand SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
|
||||
MVT::ValueType VT, SDOperand Op1,
|
||||
SDOperand Op2, SDOperand Op3,SDOperand Op4,
|
||||
SDOperand Op5) {
|
||||
RemoveNodeFromCSEMaps(N);
|
||||
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
|
||||
N->setValueTypes(VT);
|
||||
N->setOperands(Op1, Op2, Op3, Op4, Op5);
|
||||
return SDOperand(N, 0);
|
||||
}
|
||||
|
||||
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
|
||||
MVT::ValueType VT, SDOperand Op1,
|
||||
SDOperand Op2, SDOperand Op3, SDOperand Op4,
|
||||
SDOperand Op5, SDOperand Op6) {
|
||||
SDOperand SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
|
||||
MVT::ValueType VT, SDOperand Op1,
|
||||
SDOperand Op2, SDOperand Op3,SDOperand Op4,
|
||||
SDOperand Op5, SDOperand Op6) {
|
||||
RemoveNodeFromCSEMaps(N);
|
||||
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
|
||||
N->setValueTypes(VT);
|
||||
N->setOperands(Op1, Op2, Op3, Op4, Op5, Op6);
|
||||
return SDOperand(N, 0);
|
||||
}
|
||||
|
||||
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
|
||||
MVT::ValueType VT1, MVT::ValueType VT2,
|
||||
SDOperand Op1, SDOperand Op2) {
|
||||
SDOperand 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);
|
||||
return SDOperand(N, 0);
|
||||
}
|
||||
|
||||
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
|
||||
MVT::ValueType VT1, MVT::ValueType VT2,
|
||||
SDOperand Op1, SDOperand Op2, SDOperand Op3) {
|
||||
SDOperand 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);
|
||||
return SDOperand(N, 0);
|
||||
}
|
||||
|
||||
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
|
||||
MVT::ValueType VT1, MVT::ValueType VT2,
|
||||
SDOperand Op1, SDOperand Op2,
|
||||
SDOperand Op3, SDOperand Op4) {
|
||||
SDOperand 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);
|
||||
return SDOperand(N, 0);
|
||||
}
|
||||
|
||||
void SelectionDAG::SelectNodeTo(SDNode *N, unsigned TargetOpc,
|
||||
MVT::ValueType VT1, MVT::ValueType VT2,
|
||||
SDOperand Op1, SDOperand Op2,
|
||||
SDOperand Op3, SDOperand Op4, SDOperand Op5) {
|
||||
SDOperand 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);
|
||||
return SDOperand(N, 0);
|
||||
}
|
||||
|
||||
// ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead.
|
||||
|
Loading…
Reference in New Issue
Block a user