[PATCH] D70927: Introduce a CallGraph updater helper class

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 12:53:49 PST 2020


hfinkel added inline comments.


================
Comment at: llvm/include/llvm/Transforms/Utils/CallGraphUpdater.h:31
+  SmallVector<Function *, 16> DeadFunctions;
+  SmallVector<Function *, 16> DeadFunctionsInComdats;
+
----------------
Please add some documentation explaining why you have a separate list of dead Comdat functions.


================
Comment at: llvm/lib/Transforms/Utils/CallGraphUpdater.cpp:97
+    LazyCallGraph::Node &CGNode = LCG->get(NewFn);
+    CGNode.DFSNumber = CGNode.LowLink = -1;
+    CGNode.populate();
----------------
I agree with @modocache, this looks like an internal implementation detail of LCG. Can you move the logic into that class?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70927/new/

https://reviews.llvm.org/D70927





More information about the llvm-commits mailing list