add a method

llvm-svn: 23027
This commit is contained in:
Chris Lattner 2005-08-24 23:00:29 +00:00
parent d83cd354bd
commit 45e1ce4e28
2 changed files with 7 additions and 0 deletions

View File

@ -221,6 +221,7 @@ public:
/// 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, MVT::ValueType VT, unsigned TargetOpc);
void SelectNodeTo(SDNode *N, MVT::ValueType VT, unsigned TargetOpc,
SDOperand Op1);
void SelectNodeTo(SDNode *N, MVT::ValueType VT, unsigned TargetOpc,

View File

@ -1881,6 +1881,12 @@ SDOperand SelectionDAG::getNode(unsigned Opcode,
/// 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) {
RemoveNodeFromCSEMaps(N);
N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
N->setValueTypes(VT);
}
void SelectionDAG::SelectNodeTo(SDNode *N, MVT::ValueType VT,
unsigned TargetOpc, SDOperand Op1) {
RemoveNodeFromCSEMaps(N);