[PATCH] D104253: [Clang][Codegen] emit noprofile IR Fn Attr for no_instrument_function Fn Attr

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 14 12:26:51 PDT 2021


MaskRay added a comment.

`__attribute__((no_instrument_function))` seems specific to `-finstrument-functions`.  Somehow `gcc -pg` uses it as well.

The name may not be generic, so it may be odd to exclude various instrumentations under this generic attribute.

clang -fprofile-instr-generate (frontend coverage/PGO; AIUI only Apples uses it for PGO) / clang -fprofile-generate (IR PGO; most users use this) / clang -fprofile-arcs / gcc -fprofile-arcs are 4 different instrumentation approaches,
I think they are similar enough that warrant a similar function attribute.

Perhaps a good idea to file a feature request on https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=__open__&component=gcov-profile&list_id=304970&product=gcc and check what function attributes GCC wants to use.


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