[all-commits] [llvm/llvm-project] bdeb07: [libc] Only add '-fno-builtin-*' on the entrypoint...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Fri Jul 26 00:28:07 PDT 2024
Branch: refs/heads/release/19.x
Home: https://github.com/llvm/llvm-project
Commit: bdeb078aa24734ce6d2e573701f63e6111d7bab4
https://github.com/llvm/llvm-project/commit/bdeb078aa24734ce6d2e573701f63e6111d7bab4
Author: Joseph Huber <huberjn at outlook.com>
Date: 2024-07-26 (Fri, 26 Jul 2024)
Changed paths:
M libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
M libc/cmake/modules/LLVMLibCObjectRules.cmake
Log Message:
-----------
[libc] Only add '-fno-builtin-*' on the entrypoints that use them (#100481)
Summary:
The GPU build needs to be able to inline stuff in LTO. Builtin
transformations cause problems on the functions that the optimizer does
heavy libcall recognition on. Previously we moved to using
`-fno-builtin-*` to allow us to only disable the problematic ones.
However, this still didn't allow inlining because each function had the
attribute that told the inliner not to inlining a nobuiltin function
into a non-nobuiltin function
This patch fixes that by only applying these attributes to the
entrypoints that define them. That is enough to prevent recursive calls
within the definitoins themselves.
(cherry picked from commit 8e43acbfedf53ded43ec693ddaaf518cb7416c1c)
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