[PATCH] D90125: [CSSPGO] Infrastructure for context-sensitive Sample PGO and Inlining

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 10 13:10:15 PST 2020


wenlei added inline comments.


================
Comment at: llvm/include/llvm/ProfileData/SampleProf.h:361
+// Example of full context string (note the wrapping `[]`):
+//    `[main:3 @ _Z5funcAi:1 @ _Z8funcLeafi]`
+// Example of context-less function name (same as AutoFDO):
----------------
davidxl wrote:
> The syntax of the context string can probably be made more consistent like:
> 
> SampleContext : LeafContext
>                            : ParentContext   LeafContext
> 
> LeafContext: function_name
> ParentContext: [ParentFrames]
> ParentFrames:   OneParentFrame   
>                         : ParentFrames   OneParentFrame
> OneParentFrame:  function_name:line @
> 
> So in your example, the full context string should look like:
> 
> [main:3 @_Z5funcAi:1 @] _Z8funcLeafi
> 
Agreed, that's indeed more consistent and I like that better. Thanks for the suggestion. Will make the change (llvm-profgen change will follow too).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90125



More information about the llvm-commits mailing list