[PATCH] D29045: [PGO] Add option to dot-dump raw profile counts as computed by profile annotator
Rong Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 26 13:20:33 PST 2017
xur added a comment.
This gonna be very useful in debug PGO related issues -- we don't need to use the instrumentation debug dumps to track the counts (which is not available in debug builds).
Overall, the patch looks good to me except the minor issues (see inline comments).
================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1240
+ (PGOViewFunction.empty() || F.getName().equals(PGOViewFunction))) {
+ ViewGraph(&Func, "PGORawCounts");
+ }
----------------
ViewGraph is interactive. Is WriteGraph better?
I tried the patch without specified the PGOViewFunction, it just pops too many windows at once.
================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1331
+ OS << Node->getName().str() << " : ";
+ UseBBInfo *BI = Graph->findBBInfo(Node);
+ if (BI->CountValid)
----------------
Check if BI is null. If the Node is not reachable from entry. We don't have a UseBBInfo.
================
Comment at: lib/Transforms/Instrumentation/PGOInstrumentation.cpp:1332
+ UseBBInfo *BI = Graph->findBBInfo(Node);
+ if (BI->CountValid)
+ OS << BI->CountValue;
----------------
CountValid for the internal use. After count prorogation, all the reachable BBs should have a valid count.
https://reviews.llvm.org/D29045
More information about the llvm-commits
mailing list