[llvm-dev] Showing hotness in LLVM optimization remarks using AutoFDO sampling profile data?
Brian Gesiak via llvm-dev
llvm-dev at lists.llvm.org
Fri Jun 9 09:02:19 PDT 2017
(+cc Adam Nemet, since he presented on optimization remarks at LLVM Dev Mtg
I have a large C++ program, which I am compiling using a sampling profile
generated via perf and AutoFDO. I'd like to use this profile in order to
show the hotness of each code path that is displayed in the new
optimization remarks viewer tool (
It seems, however, that the '-fdiagnostics-show-hotness' option emits a
warning when used with '-fprofile-sample-use': "warning: argument
'-fdiagnostics-show-hotness' requires profile-guided optimization
Looking at the code in Clang that generates the warning, it appears that
the warning is emitted unless instrumentation profile data is provided. Am
I correct in understanding that sampling profile data cannot be used to
determine the hotness of the code paths displayed via opt-viewer?
If this is correct, I am curious if this is a hard limitation, or whether I
can do some work on CodeGen or ORE to make it possible to use a sampling
profile. I ask because, while I'm excited to use optimization remarks,
getting an instrumentation profile of my program would be difficult -- it's
performance-critical and I can't release an instrumented build.
Sorry if this is a dumb question -- I don't have much experience using PGO
-- and thanks for all the work on opt-viewer! It's really fun to use.
- Brian Gesiak
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev