[llvm] [MemProf] Disable promotion to function declarations by default (PR #192335)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 13:48:37 PDT 2026


teresajohnson wrote:

> sorry after looking at the IR again I think I've messed up what's actually happening, this has nothing to do with dead symbols
> 
> it looks like actually what's happening is that `@f` in module A is getting imported from module A to module B, and it has a call with `!inline_history` pointing to `@g` in module B, so a declaration for `@g` is also imported into module B. but `@g` gets internalized in module A, causing the undefined symbol error at link time due to ICP in module B

I see, that explains it. So yes so probably we either need to add ThinLTO ref edges from inline_history, which would result in more conservative internalization, or handle inline_history specially so we don't create the declaration which is not correct IR. I'd prefer the latter.


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


More information about the llvm-commits mailing list