[PATCH] D154364: [LTO] Allow library calls to be internalized in freestanding mode
Joseph Huber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 3 12:40:49 PDT 2023
jhuber6 added a comment.
In D154364#4469452 <https://reviews.llvm.org/D154364#4469452>, @efriedma wrote:
> 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.
I was under the impression that was what the freestanding flag did for LTO, it sets `TLII->disableAllFunctions();`. I'm guessing that's not sufficient here?
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