diff options
author | Dan Gohman <gohman@apple.com> | 2008-07-07 18:26:29 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-07-07 18:26:29 +0000 |
commit | 6d9cdd56173fb915a9e3a8f0f6b5a8ed9bed1098 (patch) | |
tree | f0fd01dcd9027f62e7e0176ab6bba577f17087d9 /include/llvm/CodeGen/SelectionDAGNodes.h | |
parent | e4706a0b51cbb6ba74844dd70a51a5fea0d2c336 (diff) |
Remove most of the uses of SDOperandPtr, usually replacing it with a
simple const SDOperand*, which is what's usually needed.
For AddNodeIDOperands, which is small, just duplicate the function to
accept an SDUse*.
For SelectionDAG::getNode - Add an overload that accepts SDUse* that
copies the operands into a temporary SDOperand array, but also has
special-case checks for 0 through 3 operands to avoid the copy in
the common cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53183 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 0831d43f5d..f5ab0707c4 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -1271,7 +1271,7 @@ protected: Prev = 0; Next = 0; } - SDNode(unsigned Opc, SDVTList VTs, SDOperandPtr Ops, unsigned NumOps) + SDNode(unsigned Opc, SDVTList VTs, const SDUse *Ops, unsigned NumOps) : NodeType(Opc), NodeId(-1), UsesSize(0), Uses(NULL) { OperandsNeedDelete = true; NumOperands = NumOps; @@ -1280,8 +1280,8 @@ protected: for (unsigned i = 0; i != NumOps; ++i) { OperandList[i] = Ops[i]; OperandList[i].setUser(this); - Ops[i].Val->addUse(OperandList[i]); - ++Ops[i].Val->UsesSize; + Ops[i].getSDOperand().Val->addUse(OperandList[i]); + ++Ops[i].getSDOperand().Val->UsesSize; } ValueList = VTs.VTs; @@ -1320,7 +1320,7 @@ protected: /// opcode, types, and operands to the specified value. This should only be /// used by the SelectionDAG class. void MorphNodeTo(unsigned Opc, SDVTList L, - SDOperandPtr Ops, unsigned NumOps); + const SDOperand *Ops, unsigned NumOps); void addUser(unsigned i, SDNode *User) { assert(User->OperandList[i].getUser() && "Node without parent"); |