[llvm] [Analysis] Visit orphan Functions in CGPassManager catch-up loop (PR #194219)
via llvm-commits
llvm-commits at lists.llvm.org
Sun May 10 08:08:15 PDT 2026
SjoerdNijboer wrote:
> > As far as I understand, lld --gc-sections will just strip this all out since it's dead code.
>
> AFAIK, that's predicated on the functions having their own section (i.e., -ffunction-section) which I'm not sure every target uses as default.
That could be true, but either way a DCE pass should remove that.
Right now in the current codebase there's a bit of ambiguity on if private orphans should or shouldn't be deleted. From my point of view that's a different discussion but should be doable nontheless. Just, IPRA shouldn't suddenly introduce private orphan deltion when other compilation options still do emit them from a functionality perspective. THat just seems like a cleanup action that should happen regardless in a different commit given the proper compilation options.
> Also, while looking for more people to add as reviewers I found this: [7ee46ed](https://github.com/llvm/llvm-project/commit/7ee46ed992690294cfe984366370cb4787fcf0f3) Which seems to have been reverted at some point, perhaps of interest
This is the [phabricator link](https://reviews.llvm.org/D48939#change-DS8zY5vUHmER) associated with 73346ed. As far as I can tell this is for always_inline annotated functions and was there to fix a bug with libc++. It seemed to have a bug due to a use after free bug in commit [ca8c2f763869](https://github.com/llvm/llvm-project/commit/ca8c2f763869).
https://github.com/llvm/llvm-project/pull/194219
More information about the llvm-commits
mailing list