[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 13:37:54 PDT 2023


jhuber6 added a reviewer: arsenm.
jhuber6 added a comment.
Herald added a subscriber: wdng.

In D154364#4469533 <https://reviews.llvm.org/D154364#4469533>, @steven_wu wrote:

> I think the strategy generally works. Those libcall functions doesn't really matter if you have a linker that can do dead-stripping but can help other linkers.
>
> I wonder if the better strategy for libcall symbol is to patch up during LTO time, rather than encode them as `used` in bitcode symtab, then you can decide based on LTO configuration. Also when there is a version mismatch between compiler and LTO, it is more important to know what LTO is considered a libcall function as it is doing the code generation.

Yeah, I'm not sure if this would block us from generating some needed runtime calls. I don't think that this would collide with the GPU at least but I'm not an expert. I'm wondering if there is a good way to slice this, because in general I think it's not ideal that we cannot treat these functions as standard symbols if we are the ones providing the implementation. E.g. if we implement `sin` on the GPU we expect to resolve it statically like any other symbol.


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