projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d9aed4
)
make sure to remove a node from the use list of its operands when we replace
author
Chris Lattner
<sabre@nondot.org>
Wed, 17 Aug 2005 01:54:00 +0000
(
01:54
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Wed, 17 Aug 2005 01:54:00 +0000
(
01:54
+0000)
it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22820
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/CodeGen/SelectionDAGNodes.h
patch
|
blob
|
history
diff --git
a/include/llvm/CodeGen/SelectionDAGNodes.h
b/include/llvm/CodeGen/SelectionDAGNodes.h
index 00b94037ad226c5b8ba8f94647c8325ab00f07e2..930a163848efa77f5b71961655f1faf495770e7c 100644
(file)
--- a/
include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/
include/llvm/CodeGen/SelectionDAGNodes.h
@@
-614,7
+614,14
@@
protected:
void MorphNodeTo(unsigned Opc) {
NodeType = Opc;
Values.clear();
- Operands.clear();
+
+ // Clear the operands list, updating used nodes to remove this from their
+ // use list.
+ while (!Operands.empty()) {
+ SDNode *O = Operands.back().Val;
+ Operands.pop_back();
+ O->removeUser(this);
+ }
}
void setValueTypes(MVT::ValueType VT) {