mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-02 19:24:25 +00:00
building on the new CallGraphSCC abstraction, teach CallGraphSCCPassManager
to keep the node entries in scc_iterator up to date instead of dangling as the SCC mutates. This is a really terrible problem which was causing -g to affect codegen because it would permute the memory image of the compiler process. Thanks to Dale for expertly hunting it down. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101565 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -417,6 +417,11 @@ void CallGraphSCC::ReplaceNode(CallGraphNode *Old, CallGraphNode *New) {
|
||||
Nodes[i] = New;
|
||||
break;
|
||||
}
|
||||
|
||||
// Update the active scc_iterator so that it doesn't contain dangling
|
||||
// pointers to the old CallGraphNode.
|
||||
scc_iterator<CallGraph*> *CGI = (scc_iterator<CallGraph*>*)Context;
|
||||
CGI->ReplaceNode(Old, New);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user