[compiler-rt] [llvm] [RFC][Transforms][IPO] Add func suffix in ArgumentPromotion and DeadArgumentElimination (PR #109899)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 15:18:39 PDT 2024
snehasish wrote:
There are downstream (internal) usages which rely on function names as they exist in the symbol table. Memprof relies on the dwarf linkage name so it's usage is similar to llvm-profgen. In the past, suffixes after a period in the symbol were meant to be interpreted as clones of the original function, however it is not well defined.
Personally, I'm not in favour of overloading the existing usage by appending suffixes to indicate the optimizations performed. This seems to be a hacky approach and instead we should adopt a more formal mechanism to communicate such information to external tools. As @mtrofin suggested it would be a good to start an RFC discussion on discourse to gather the different usages from a broader set of users than those on this patch before proceeding.
Since not all suffixes are the same, key considerations for the discourse RFC could be -
* when the symbol name changes
clang backend e.g. `-funiq-internal-linkage-name`
LLVM IR - function specialization
ThinLTO promotion
Backend - Propeller / FDO based function splitting
* what do the suffixes imply (clones, modifications, parts etc)
* how should debuggers and profiling tools treat the symbols
Some of these were discussed piecemeal in #105742 however a broader discussion could be beneficial. What do you think?
https://github.com/llvm/llvm-project/pull/109899
More information about the llvm-commits
mailing list