[all-commits] [llvm/llvm-project] 193e41: [Clang][Codegen] Add GNU function attribute 'no_pr...
Nick Desaulniers via All-commits
all-commits at lists.llvm.org
Fri Jun 18 13:42:56 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 193e41c987127aad86d0380df83e67a85266f1f1
https://github.com/llvm/llvm-project/commit/193e41c987127aad86d0380df83e67a85266f1f1
Author: Nick Desaulniers <ndesaulniers at google.com>
Date: 2021-06-18 (Fri, 18 Jun 2021)
Changed paths:
M clang/include/clang/Basic/Attr.td
M clang/include/clang/Basic/AttrDocs.td
M clang/lib/CodeGen/CodeGenFunction.cpp
A clang/test/CodeGen/no_profile.c
M clang/test/Misc/pragma-attribute-supported-attributes-list.test
A clang/test/Sema/no_profile-attribute.c
Log Message:
-----------
[Clang][Codegen] Add GNU function attribute 'no_profile' and lower it to noprofile
noprofile IR attribute already exists to prevent profiling with PGO;
emit that when a function uses the newly added no_profile function
attribute.
The Linux kernel would like to avoid compiler generated code in
functions annotated with such attribute. We already respect this for
libcalls to fentry() and mcount().
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
Link: https://lore.kernel.org/lkml/CAKwvOdmPTi93n2L0_yQkrzLdmpxzrOR7zggSzonyaw2PGshApw@mail.gmail.com/
Reviewed By: MaskRay, void, phosek, aaron.ballman
Differential Revision: https://reviews.llvm.org/D104475
More information about the All-commits
mailing list