[PATCH] D77855: [CallGraphUpdater] Remove nodes from their SCC (old PM)
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 12 08:00:09 PDT 2020
hfinkel accepted this revision.
hfinkel added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Transforms/Utils/CallGraphUpdater.cpp:108
+ // For the old call graph we remove the function from the SCC right away.
+ if (CGSCC && !ReplacedFunctions.count(&DeadFn))
+ CGSCC->DeleteNode((*CG)[&DeadFn]);
----------------
I realize that this probably doesn't matter, but I wonder if the code would be clearer here if you wrote:
if (CG && ...)
because you've dereferencing CG here and use of CGSCC is guarded below by GC (instead of directly by checking CGSCC). Keeping the guarding conditions the same should make the code more readable by eliminating potential questions about why they're different.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77855/new/
https://reviews.llvm.org/D77855
More information about the llvm-commits
mailing list