[clang] [llvm] [MemProf] Expand optimization scope to internal linakge function (PR #73236)
Teresa Johnson via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 29 10:03:19 PST 2023
teresajohnson wrote:
@snehasish and I chatted more about this offline. Using the dwarf info to figure out the right source name prefix during indexing is not straightforward. The source file name used as the prefix in the compiler for the IRPGOName is that of the TU. The source file of the line in the dwarf info may be a header. It could be possible to walk up the profiled inline frames to find a source file, but that is error prone in certain circumstances (e.g. if the profiled binary had thinlto cross module inlining, and if it isn't obvious which source file name is a non-included TU).
I think your change to the matching is almost strictly better than the complete non-matching we get currently for local functions. It would even work in many cases without uniq suffixes, but uniq suffixes will make that work even better. So let's go ahead with that change.
However, we'd like to request that you split the __cxx_global_var_init change into a separate patch, as it is somewhat orthogonal to the matching change, and in case there are unexpected issues with that change. Can you split that out and make the test case here for matching of a non __cxx_global_var_init function?
Thanks!
https://github.com/llvm/llvm-project/pull/73236
More information about the cfe-commits
mailing list