[PATCH] D109551: [AutoFDO][llvm-profgen] Profile generation for LBR(non-CS) sample

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 21 12:49:38 PDT 2021


wenlei added inline comments.


================
Comment at: llvm/test/tools/llvm-profgen/inline-noprobe.test:10
+CHECK:   3: 62
+CHECK:   3.2: 21
+CHECK:   3.1: bar:252
----------------
Add a test case to cover call site profile for inlinees?


================
Comment at: llvm/test/tools/llvm-profgen/noinline-noprobe.test:12
+CHECK:  2: 19
+CHECK:  3: 19 bar:21
+CHECK: bar:324:21
----------------
We may want to strengthen the tests a bit since breaking llvm-profgen would be quite impactful for AutoFDO performance. 

- Add a test to cover call site profile with multiple targets? 
- Test discriminator: we have correct base discriminator as well as duplication factor in the generated profile.
- Different profile format, extended binary format has profiled symbol list (it's ok to deal with symbol list later and separately)
- Cover these cases for nested inlinee profile too.  


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:320
+    FunctionSamples &CalleeProfile = getTopLevelFunctionProfile(CalleeName);
+    assert(Count != 0 && "Unexpected zero weight branch");
+    CalleeProfile.addHeadSamples(Count);
----------------
move this assertion to the top? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109551



More information about the llvm-commits mailing list