[PATCH] D104253: [Clang][Codegen] emit noprofile IR Fn Attr for no_instrument_function Fn Attr
Marco Elver via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 14 12:24:06 PDT 2021
melver added a comment.
In D104253#2817673 <https://reviews.llvm.org/D104253#2817673>, @void wrote:
> What are your thoughts on adding a `noprofile` function attribute in the FE? @MaskRay suggested filing a bug with gcov (below) to get their take on it.
>
> https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=__open__&component=gcov-profile&list_id=304970&product=gcc
How similar is all this stuff? Looking at https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html
If `no_instrument_function` is the catchall for this profile/gcov/pg instrumentation, I don't think anybody will object.
The result is 1) pg/-fprofile/gcov stuff, 2) sanitizers. (1) is suppressible via `no_instrument_function`, (2) via `no_sanitize*`. This appears consistent vs. having `no_instrument_function`+`noprofile`+`no_sanitize*`
As a user, this is the intuitive behaviour I'd expect at least.
But asking GCC folks (Martin helped us with no_sanitize_coverage) for input is reasonable.
================
Comment at: clang/test/CodeGen/fprofile-instrument.c:5
+
+int __attribute__((__no_instrument_function__))
+__attribute__((no_instrument_function))
----------------
Only one of the spellings should be required.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104253/new/
https://reviews.llvm.org/D104253
More information about the cfe-commits
mailing list