[llvm] [MemProf] Handle empty stack context during ThinLTO cloning (PR #81008)

via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 23:05:07 PST 2024


lifengxiang1025 wrote:

> Presumably this happened as a result of inlining, but
in theory the metadata should have been replaced with an attribute in
that case.

BTW, I'm investigating one problems now that IR metadata doesn't match function summary. I found one function foo(template function) is linkonce linkage after thin_compile and it has many copies. Copy1 inlines it's callee and copy2 doesn't. So copy1 has one callsite metadata but copy2 doesn't. Copy1's linkage is weak_odr and copy2's linkage is AvailableExternallyLinkage in function summary after thin_link. The problem happens in thin_backend, compiler choose copy2's definition and copy1's summary. And finally trigger an assertion.

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


More information about the llvm-commits mailing list