[PATCH] D94111: [CSSPGO][llvm-profgen] Merge and trim profile for cold context to reduce profile size

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 10 23:20:13 PST 2021


wmi added inline comments.


================
Comment at: llvm/test/tools/llvm-profgen/merge-cold-profile.test:6
+; Test --csprof-keep-cold
+; RUN: llvm-profgen --perfscript=%S/Inputs/recursion-compression.perfscript --binary=%S/Inputs/recursion-compression.perfbin --output=%t --compress-recursion=-1 --csprof-cold-thres=100 --csprof-keep-cold
+; RUN: FileCheck %s --input-file %t --check-prefix=CHECK-KEEP-COLD
----------------
I see "[main:2 @ foo:5 @ fa:8 @ fa:7 @ fb:5 @ fb]:9:4" is trimmed but [fa]:14:4 is kept, so the threshold should be 10?


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:349
+      continue;
+    ToRemoveVec.emplace_back(std::make_pair(I.getKey(), &I.second));
+  }
----------------
emplace_back(I.getKey(), &I.second)?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94111/new/

https://reviews.llvm.org/D94111



More information about the llvm-commits mailing list