[CallGraphUpdater] Remove nodes from their SCC (old PM)
authorJohannes Doerfert <johannes@jdoerfert.de>
Thu, 9 Apr 2020 20:43:31 +0000 (15:43 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Wed, 15 Apr 2020 23:38:50 +0000 (18:38 -0500)
commit937025757c871c6caa62ec1858390a340e3ab526
treec25aa9e1d0a0607beae51be999a68de9207696ea
parent1b34b84ddd666a30b0e7e18177997bab32e826b7
[CallGraphUpdater] Remove nodes from their SCC (old PM)

Summary:
We can and should remove deleted nodes from their respective SCCs. We
did not do this before and this was a potential problem even though I
couldn't locally trigger an issue. Since the `DeleteNode` would assert
if the node was not in the SCC, we know we only remove nodes from their
SCC and only once (when run on all the Attributor tests).

Reviewers: lebedev.ri, hfinkel, fhahn, probinson, wristow, loladiro, sstefan1, uenoku

Subscribers: hiraditya, bollu, uenoku, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77855
llvm/include/llvm/Analysis/CallGraphSCCPass.h
llvm/lib/Analysis/CallGraphSCCPass.cpp
llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
llvm/unittests/IR/LegacyPassManagerTest.cpp