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

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 16 21:50:30 PDT 2021


hoy added inline 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>>;
----------------
wenlei wrote:
> comment for the key, value details would be helpful
Comment added.


================
Comment at: llvm/lib/Transforms/IPO/SampleProfileProbe.cpp:414
 
 void PseudoProbeUpdatePass::runOnFunction(Function &F,
                                           FunctionAnalysisManager &FAM) {
----------------
wenlei wrote:
> 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.  
Good point. Comments added in both places.


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