aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/SelectionDAGNodes.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-07-07 20:57:48 +0000
committerDan Gohman <gohman@apple.com>2008-07-07 20:57:48 +0000
commitb997a4e4f92a1b9b4be917a32bc21cb52a63c399 (patch)
tree379b6151e0b3a8c3be5b8bdb20de1afe162eaead /include/llvm/CodeGen/SelectionDAGNodes.h
parentac6f892ed0130543aa55a7891644c7599aacbb78 (diff)
downloadexternal_llvm-b997a4e4f92a1b9b4be917a32bc21cb52a63c399.zip
external_llvm-b997a4e4f92a1b9b4be917a32bc21cb52a63c399.tar.gz
external_llvm-b997a4e4f92a1b9b4be917a32bc21cb52a63c399.tar.bz2
Fix SDNode::MorphNodeTo (a function used by by SelectNodeTo) to
properly track dead nodes that are on the original SDNode's operand list but not the new one, and have no other uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53201 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index f5ab070..fe1cab6 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -1315,12 +1315,18 @@ protected:
++Ops[i].getVal()->UsesSize;
}
}
+
+ /// DropOperands - Release the operands and set this node to have
+ /// zero operands. This should only be used by HandleSDNode to clear
+ /// its operand list.
+ void DropOperands();
/// 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);
+ const SDOperand *Ops, unsigned NumOps,
+ SmallVectorImpl<SDNode *> &DeadNodes);
void addUser(unsigned i, SDNode *User) {
assert(User->OperandList[i].getUser() && "Node without parent");