diff options
author | Chris Lattner <sabre@nondot.org> | 2007-02-04 02:49:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-02-04 02:49:29 +0000 |
commit | d429bcd4ac734540ebbc15a0ee37d154ae1daf73 (patch) | |
tree | ec6386a402fe47bc1d6d86771dff285edbdd77d8 /include | |
parent | 48b85926524f9d29ae600123c90194cd73fd629e (diff) | |
download | llvm-d429bcd4ac734540ebbc15a0ee37d154ae1daf73.tar.gz llvm-d429bcd4ac734540ebbc15a0ee37d154ae1daf73.tar.bz2 llvm-d429bcd4ac734540ebbc15a0ee37d154ae1daf73.tar.xz |
move MorphNode to out of line and merge setNodeOperands into it. There is
no behavior or performance change here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33869 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 5e4be98e80..7fe97be806 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -967,22 +967,11 @@ protected: Prev = 0; Next = 0; } - /// MorphNodeTo - This clears the return value and operands list, and sets the - /// opcode of the node to the specified value. This should only be used by - /// the SelectionDAG class. - void MorphNodeTo(unsigned Opc, SDVTList L) { - NodeType = Opc; - ValueList = L.VTs; - NumValues = L.NumVTs; - - // Clear the operands list, updating used nodes to remove this from their - // use list. - for (op_iterator I = op_begin(), E = op_end(); I != E; ++I) - I->Val->removeUser(this); - delete [] OperandList; - OperandList = 0; - NumOperands = 0; - } + /// MorphNodeTo - This frees the operands of the current node, resets the + /// opcode, types, and operands to the specified value. This should only be + /// used by the SelectionDAG class. + void MorphNodeTo(unsigned Opc, SDVTList L, + const SDOperand *Ops, unsigned NumOps); void setValueTypes(SDVTList L) { assert(NumValues == 0 && "Should not have values yet!"); @@ -990,18 +979,6 @@ protected: NumValues = L.NumVTs; } - void setOperands(const SDOperand *Ops, unsigned NumOps) { - assert(NumOperands == 0 && "Should not have operands yet!"); - NumOperands = NumOps; - OperandList = new SDOperand[NumOperands]; - - for (unsigned i = 0, e = NumOps; i != e; ++i) { - OperandList[i] = Ops[i]; - SDNode *N = OperandList[i].Val; - N->Uses.push_back(this); - } - } - void addUser(SDNode *User) { Uses.push_back(User); } |