[PATCH] D114284: [llvm-profgen] Truncate the context with zero probe ID

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 30 13:14:43 PST 2021


wlei added inline comments.


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:775
                "Inferred caller's location index shouldn't be zero!");
         FunctionSamples &CallerProfile =
             getFunctionProfileForContext(CallerContextId);
----------------
wenlei wrote:
> Before this fix, when CalleeContextId only has one frame, what did we get for CallerProfile? A dummy root profile with empty name? 
Before this fix, CalleeContextId is guaranteed to have >1 frame,  see there is a check `if (InlinerDesc != nullptr)` to make sure the callee always has the inliner which means we only infer caller's count for inlining.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114284



More information about the llvm-commits mailing list