[PATCH] D131195: [InstrProf][attempt 2] Add new format for -fprofile-list=

Ellis Hoag via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 4 12:51:19 PDT 2022


ellis created this revision.
Herald added a project: All.
ellis added reviewers: phosek, davidxl, thakis.
ellis published this revision for review.
ellis added inline comments.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.


================
Comment at: clang/test/CodeGen/profile-filter-new.c:14
+// RUN: echo "[llvm]" > %t2.list
+// RUN: echo "source:%s=forbid" | sed -e 's/\\/\\\\/g' >> %t2.list
+// RUN: echo "function:foo=allow" >> %t2.list
----------------
I think the Windows test from D130808 broke because this `sed` command was interacting badly with newlines. Using multiple `echo` commands seems to work.


In D130807 <https://reviews.llvm.org/D130807> we added the `skipprofile` attribute. This commit
changes the format so we can either `forbid` or `skip` profiling
functions by adding the `noprofile` or `skipprofile` attributes,
respectively. The behavior of the original format remains
unchanged.

Also, add the `skipprofile` attribute when using
`-fprofile-function-groups`.

This was originally landed as https://reviews.llvm.org/D130808 but was
reverted due to a Windows test failure.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131195

Files:
  clang/docs/UsersManual.rst
  clang/include/clang/Basic/ProfileList.h
  clang/lib/Basic/ProfileList.cpp
  clang/lib/CodeGen/CodeGenFunction.cpp
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/CodeGen/CodeGenModule.h
  clang/test/CodeGen/profile-filter-new.c
  clang/test/CodeGen/profile-function-groups.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131195.450105.patch
Type: text/x-patch
Size: 15934 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220804/859c0ad7/attachment-0001.bin>


More information about the cfe-commits mailing list