[PATCH] D115847: [mlgo][inline] Improve global state tracking

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 18 09:23:51 PST 2022


aeubanks accepted this revision.
aeubanks added a comment.

looks good except for the one comment



================
Comment at: llvm/lib/Analysis/MLInlineAdvisor.cpp:158
+  for (const auto *N : NodesInLastSCC) {
+    if (N->isDead() || N->getFunction().isDeclaration())
+      continue;
----------------
mtrofin wrote:
> aeubanks wrote:
> > does this come up? the CGSCC infra only visits function definitions
> N->isDead could happen if the function for N died since. The second part - not sure, I could imagine a pass converting an implementation to an intrinsic? 
a pass wouldn't replace the node with an intrinsic, every node is required to have a function definition
so I'd remove the check for a function declaration


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115847



More information about the llvm-commits mailing list