[PATCH] D102429: [CSSPGO] Update pseudo probe distribution factor based on inline context.

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 15 17:40:58 PDT 2021


wenlei accepted this revision.
wenlei added a comment.

lgtm, with some nit on comments.



================
Comment at: llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h:36
 using InstructionIdMap = std::unordered_map<Instruction *, uint32_t>;
-using ProbeFactorMap = std::unordered_map<uint64_t, float>;
+using ProbeFactorMap = std::unordered_map<std::pair<uint64_t, uint64_t>, float,
+                                          pair_hash<uint64_t, uint64_t>>;
----------------
comment for the key, value details would be helpful


================
Comment at: llvm/lib/Transforms/IPO/SampleProfileProbe.cpp:414
 
 void PseudoProbeUpdatePass::runOnFunction(Function &F,
                                           FunctionAnalysisManager &FAM) {
----------------
Not directly related to this change, but PseudoProbeUpdatePass can use some header comments describing the high level idea for distribution factor update.

The fields in IR/PseudoProbe.h/PseudoProbe can also use some comments.  


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102429



More information about the llvm-commits mailing list