[llvm] [MLInliner] Simplify NodeCount bookkeeping (PR #96576)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 28 14:24:22 PDT 2024


aeubanks wrote:

so thinking about this a bit more, it's harder to keep track of the number of live functions after #94815. you can look at `CGSCCUpdateResult::DeadFunctions` (which we don't currently pass to the InlineAdvisor, but we probably could).

pre-#94815, with this patch, we can't detect if another CGSCC pass will come and delete a function. currently that doesn't matter since the inliner is the only CGSCC pass that deletes functions, but I believe the current logic does allow the inline advisor to detect if another CGSCC pass deletes a function.

is there any reason we don't just use `Module.getFunctions().size()` for `NodeCount`?

https://github.com/llvm/llvm-project/pull/96576


More information about the llvm-commits mailing list