[PATCH] D136846: [Driver] Add -fsample-profile-use-profi

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 3 18:11:30 PDT 2022


MaskRay requested changes to this revision.
MaskRay added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang/docs/UsersManual.rst:2246
+  blocks. Profi (profile inference) algorithm can infer block and edge counts
+  to fix them. For applying this, you can use an additional flag
+  ``-fsample-profile-use-profi`` to the command line.
----------------
This sentence is unnecessarily long. Just say `Enable it with -fsample-profile-use-profi.` (with correct backquotes)


================
Comment at: clang/include/clang/Driver/Options.td:1253
+    Flags<[NoXarchOption, CC1Option]>, Group<f_Group>,
+    HelpText<"Use profi to infer block and edge counts.">,
+    DocBrief<[{Infer block and edge counts. If the profiles have errors or missing
----------------
Omit trailing `.` in HelpText.


================
Comment at: clang/test/Driver/pgo-sample-use-profi.c:1
+// Test if profi flat is enabled in frontend as user-facing feature.
+//
----------------
Optional: `///`

Make non-RUN non-CHECK comments stand out and help tools finding unused/incorrect prefixes.


================
Comment at: clang/test/Driver/pgo-sample-use-profi.c:2
+// Test if profi flat is enabled in frontend as user-facing feature.
+//
+// RUN: %clang -c -fsample-profile-use-profi -fprofile-sample-use=%S/../CodeGen/Inputs/pgo-sample.prof -### %s 2>&1 | FileCheck %s
----------------
`//` => ``


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136846/new/

https://reviews.llvm.org/D136846



More information about the cfe-commits mailing list