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 | 703ce5d0c363816b7cac7310461fad4fc3796267 (patch) | |
| tree | f0fd01dcd9027f62e7e0176ab6bba577f17087d9 /include/llvm/CodeGen/SelectionDAGNodes.h | |
| parent | 66d19462466d5f9c8f8c9d8c1789a86a9937ce73 (diff) | |
| download | external_llvm-703ce5d0c363816b7cac7310461fad4fc3796267.zip external_llvm-703ce5d0c363816b7cac7310461fad4fc3796267.tar.gz external_llvm-703ce5d0c363816b7cac7310461fad4fc3796267.tar.bz2 | |
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 0831d43..f5ab070 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"); |
