[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
Wed Jul 5 05:21:54 PDT 2023
jhuber6 added a comment.
In D154364#4473447 <https://reviews.llvm.org/D154364#4473447>, @arsenm wrote:
> In D154364#4469554 <https://reviews.llvm.org/D154364#4469554>, @jhuber6 wrote:
>
>> 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.
>
> There is no amdgpu compiler-rt. We'll just fail if we end up accidentally hitting the libcall legalizations in the DAG and we try to inline expand everything. It may not always be this way, I do think we'd be better off in a few instances emitting compiler-rt style calls but we're not going to be doing that any time soon. The worst offenders are the giant f64 math intrinsics which are just totally unhandled
If nothing else I could probably keep this approach but only enable it on NVPTX and AMDGPU as they are totally unhosted as far as I'm aware.
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