mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-02 09:33:59 +00:00
make sure to remove a node from the use list of its operands when we replace
it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22820 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6d9aed4f8f
commit
b467f8af41
@ -614,7 +614,14 @@ protected:
|
|||||||
void MorphNodeTo(unsigned Opc) {
|
void MorphNodeTo(unsigned Opc) {
|
||||||
NodeType = Opc;
|
NodeType = Opc;
|
||||||
Values.clear();
|
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) {
|
void setValueTypes(MVT::ValueType VT) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user