From: Chris Lattner Date: Sun, 21 Aug 2005 18:49:58 +0000 (+0000) Subject: Add 5-operand version of SelectNodeTo X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=d54209fcf9af827fecfaf32685a0fb8caf7cadb1;p=oota-llvm.git Add 5-operand version of SelectNodeTo git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22950 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index b93dd124a13..d7c12c6250d 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -229,6 +229,9 @@ public: SDOperand Op1, SDOperand Op2, SDOperand Op3); void SelectNodeTo(SDNode *N, MVT::ValueType VT, unsigned TargetOpc, SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4); + void SelectNodeTo(SDNode *N, MVT::ValueType VT, unsigned TargetOpc, + SDOperand Op1, SDOperand Op2, SDOperand Op3, SDOperand Op4, + SDOperand Op5); SDOperand getTargetNode(unsigned Opcode, MVT::ValueType VT, SDOperand Op1) { diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 56a279c77be..5681a36f5c4 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -678,6 +678,18 @@ protected: Op0.Val->Uses.push_back(this); Op1.Val->Uses.push_back(this); Op2.Val->Uses.push_back(this); Op3.Val->Uses.push_back(this); } + void setOperands(SDOperand Op0, SDOperand Op1, SDOperand Op2, SDOperand Op3, + SDOperand Op4) { + Operands.reserve(5); + Operands.push_back(Op0); + Operands.push_back(Op1); + Operands.push_back(Op2); + Operands.push_back(Op3); + Operands.push_back(Op4); + Op0.Val->Uses.push_back(this); Op1.Val->Uses.push_back(this); + Op2.Val->Uses.push_back(this); Op3.Val->Uses.push_back(this); + Op4.Val->Uses.push_back(this); + } void addUser(SDNode *User) { Uses.push_back(User); }