[all-commits] [llvm/llvm-project] 8e43ac: [libc] Only add '-fno-builtin-*' on the entrypoint...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Wed Jul 24 19:06:41 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8e43acbfedf53ded43ec693ddaaf518cb7416c1c
https://github.com/llvm/llvm-project/commit/8e43acbfedf53ded43ec693ddaaf518cb7416c1c
Author: Joseph Huber <huberjn at outlook.com>
Date: 2024-07-24 (Wed, 24 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.
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