[llvm-branch-commits] [llvm] [BOLT] Add profile density computation (PR #101094)

Lei Wang via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jul 29 16:48:05 PDT 2024


================
@@ -223,6 +223,22 @@ static cl::opt<unsigned> TopCalledLimit(
              "functions section"),
     cl::init(100), cl::Hidden, cl::cat(BoltCategory));
 
+// Profile density options, synced with llvm-profgen/ProfileGenerator.cpp
+static cl::opt<bool> ShowDensity("show-density", cl::init(false),
----------------
wlei-llvm wrote:

In llvm-profgen, this flag is only used to print the density number(the last `outs()`), it by default enables the density calculation so that if the density is low, we emit a warning for this. But here it's a global switch, is this intentional? 

https://github.com/llvm/llvm-project/pull/101094


More information about the llvm-branch-commits mailing list