[PATCH] D129594: [InstrProf] Add options to profile function groups

Ellis Hoag via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 13 09:18:03 PDT 2022


ellis created this revision.
Herald added a subscriber: Enna1.
Herald added a project: All.
ellis edited the summary of this revision.
ellis added reviewers: ianlevesque, kyulee, MaskRay, phosek, wenlei, davidxl.
Herald added a subscriber: StephenFan.
ellis updated this revision to Diff 444091.
ellis added a comment.
ellis edited the summary of this revision.
ellis updated this revision to Diff 444108.
ellis edited the summary of this revision.
ellis published this revision for review.
Herald added projects: clang, Sanitizers.
Herald added subscribers: Sanitizers, cfe-commits.

Add docs


ellis added a comment.

Fix test


Add two options, `-fprofile-function-groups=N` and `-fprofile-selected-function-group=i` used to partition functions into `N` groups and only instrument the functions in group `i`. Similar options were added to xray in https://reviews.llvm.org/D87953 and the goal is the same; to reduce instrumented size overhead by spreading the overhead across multiple builds. Raw profiles from different groups can be added like normal using the `llvm-profdata merge` command.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129594

Files:
  clang/docs/ClangCommandLineReference.rst
  clang/docs/UsersManual.rst
  clang/include/clang/Basic/CodeGenOptions.def
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/CodeGenFunction.cpp
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/CodeGen/CodeGenModule.h
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/CodeGen/profile-function-groups.c
  compiler-rt/test/profile/instrprof-groups.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129594.444108.patch
Type: text/x-patch
Size: 11171 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220713/c3415053/attachment.bin>


More information about the cfe-commits mailing list