[PATCH] D154364: [LTO] Allow library calls to be internalized in freestanding mode
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 3 12:29:16 PDT 2023
efriedma added a comment.
RuntimeLibcalls.def describes libcalls which can be emitted by various backends. This means that, absent a promise from a particular backend that it won't call a given symbol, the symbols in question must be available post-LTO. Erasing the whole PreservedSymbols simply doesn't work, at least not for the targets I'm familiar with; there are symbols which will be used unconditionally for certain IR constructs, so we must preserve those symbols. (For example, if you're on a soft-float target, and you're compiling code that uses floating-point, you need the compiler-rt soft-float routines.)
If RuntimeLibcalls.def contains symbols that you don't actually need in specific scenarios, we need a mechanism to narrow the list somehow. Maybe we can add a target hook to get a target-specific list of relevant symbols.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154364/new/
https://reviews.llvm.org/D154364
More information about the llvm-commits
mailing list