Changes in directory llvm/include/llvm/CodeGen:
SelectionDAGNodes.h updated: 1.170 -> 1.171 --- Log message: move MorphNode to out of line and merge setNodeOperands into it. There is no behavior or performance change here. --- Diffs of the changes: (+5 -28) SelectionDAGNodes.h | 33 +++++---------------------------- 1 files changed, 5 insertions(+), 28 deletions(-) Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.170 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.171 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.170 Sat Feb 3 20:41:42 2007 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Sat Feb 3 20:49:29 2007 @@ -967,22 +967,11 @@ 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 @@ 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); } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits