mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
InequalityGraph::node() can create new nodes, invalidating iterators across
the set of nodes. Fix makeEqual to handle this by creating the new node first then iterating across them second. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51573 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
70ef629d46
commit
6918a9141e
@ -1594,6 +1594,7 @@ namespace {
|
|||||||
if (mergeIGNode) {
|
if (mergeIGNode) {
|
||||||
// Create N1.
|
// Create N1.
|
||||||
if (!n1) n1 = VN.getOrInsertVN(V1, Top);
|
if (!n1) n1 = VN.getOrInsertVN(V1, Top);
|
||||||
|
IG.node(n1); // Ensure that IG.Nodes won't get resized
|
||||||
|
|
||||||
// Migrate relationships from removed nodes to N1.
|
// Migrate relationships from removed nodes to N1.
|
||||||
for (SetVector<unsigned>::iterator I = Remove.begin(), E = Remove.end();
|
for (SetVector<unsigned>::iterator I = Remove.begin(), E = Remove.end();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user