[all-commits] [llvm/llvm-project] 221d5c: [libc] Disable `-ffreestanding` and `-fno-builtin`...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Tue Jul 9 05:52:12 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 221d5c570c2ad0201d808b889280ef71b80c1845
https://github.com/llvm/llvm-project/commit/221d5c570c2ad0201d808b889280ef71b80c1845
Author: Joseph Huber <huberjn at outlook.com>
Date: 2024-07-09 (Tue, 09 Jul 2024)
Changed paths:
M libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
Log Message:
-----------
[libc] Disable `-ffreestanding` and `-fno-builtin` on the GPU build (#97636)
Summary:
This patch removed the `-ffreestanding` and `-fno-builtin` flags from
the publically installed version of the GPU library. The presense of
`-fno-builtin` caused issues that prevented all inlining in the GPU C
library, see
https://discourse.llvm.org/t/rfc-libc-ffreestanding-fno-builtin/75883.
Previously, I attempted to fix this by loosening the restriction that
`"no-builtins"` functions cannot be inlined into functions without that
attribute. However, that opened up a lot of extra issues that stalled
that approach.
This patch instead removes that and instead passes `-fno-builtin-<xyz>`
for the few calls that are known to be problematic. I believe this works
in general as the GPU backends do not emit any libcalls and the
implementations of most of these simply reduce to builtins right now.
This is a very useful patch as we can now actually inline calls.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list