[PATCH] D28967: [PGO] Add option to view CFG with profile after profile annotation

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 19:52:10 PST 2017


vsk added inline comments.


================
Comment at: Transforms/Instrumentation/PGOInstrumentation.cpp:151
+static cl::opt<std::string>
+    PGOViewCountsName("pgo-view-counts-name", cl::Hidden,
+                      cl::desc("The option to specify "
----------------
Could you change the name of the flag to reference the fact that this enables filtering by function name? E.g 'pgo-inspect-func' or 'pgo-view-function'.


================
Comment at: Transforms/Instrumentation/PGOInstrumentation.cpp:1218
       HotFunctions.push_back(&F);
+#ifndef NDEBUG
+    if (PGOViewCounts &&
----------------
Does this have to be guarded by NDEBUG? It seems strange that the cl::opt will be visible + non-functional in release mode.


https://reviews.llvm.org/D28967





More information about the llvm-commits mailing list