[PATCH] D130807: [InstrProf] Add the omitprofile attribute
Ellis Hoag via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 29 16:53:08 PDT 2022
ellis created this revision.
Herald added subscribers: Enna1, wenlei, jdoerfert, hiraditya.
Herald added a project: All.
ellis edited the summary of this revision.
ellis added reviewers: phosek, davidxl.
ellis published this revision for review.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.
As discussed in [0], this diff adds the `omitprofile` attribute to
prevent the function from being profiled while allowing profiled
functions to be inlined into it. The `noprofile` attribute remains
unchanged.
The `noprofile` attribute is used for functions where it is
dangerous to add instrumentation to while the `omitprofile` attribute is
used to reduce code size or performance overhead.
[0] https://discourse.llvm.org/t/why-does-the-noprofile-attribute-restrict-inlining/64108
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D130807
Files:
clang/lib/CodeGen/CodeGenFunction.h
clang/lib/CodeGen/CodeGenPGO.cpp
clang/test/CodeGen/profile-function-groups.c
llvm/docs/LangRef.rst
llvm/include/llvm/Bitcode/LLVMBitCodes.h
llvm/include/llvm/IR/Attributes.td
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
llvm/lib/Transforms/Utils/CodeExtractor.cpp
llvm/test/Bitcode/attributes.ll
llvm/test/Transforms/GCOVProfiling/noprofile.ll
llvm/test/Transforms/PGOProfile/noprofile.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130807.448740.patch
Type: text/x-patch
Size: 9341 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220729/1ceb2d22/attachment-0001.bin>
More information about the cfe-commits
mailing list