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

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 31 02:54:33 PDT 2022


hans added inline comments.


================
Comment at: clang/include/clang/Driver/Options.td:1254
+    HelpText<"Use profi to infer block and edge counts.">,
+    DocBrief<[{Profi - a flow-based profile inference algorithm is an extended
+               and significantly re-engineered classic MCMF (min-cost max-flow)
----------------
I have to say, just reading this text I don't understand what it does.

I think a good description would start with "Infer block and edge counts " and then some kind of summary of how it does that.

I assume profile info is still needed for this (that's the input, right?) That should probably also be explained, and maybe we should warn when using -fsample-profile-use-profi without -fprofile-sample-use?


My main concern is that there's no documentation for this. How is a user supposed to learn about this feature and how it works? Why can't someone add something to https://clang.llvm.org/docs/UsersManual.html#profile-guided-optimization ? Once that is figured out, describing what the option does will probably be easy.


================
Comment at: clang/test/CodeGen/pgo-sample-use-profi.c:1
+//Test if profi flat is enabled in frontend as user-facing feature.
+//
----------------
This file should be under clang/test/Driver/ not CodeGen/ (since it's testing Driver functionality)

nit: There should typically be a space after the //



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