[PATCH] D89723: [CSSPGO][llvm-profgen]Context-sensitive profile data generation

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 29 15:21:15 PDT 2020


wenlei added inline comments.


================
Comment at: llvm/test/tools/llvm-profgen/noinline-cs-noprobe.test:7
+; CHECK: 3: 1756 bar:1745
+; CHECK:[main:1 @ foo:3 @ bar]:29103:1745
+; CHECK: 0: 1745
----------------
wmi wrote:
> Is it possible for us to tell one level in context is inlined or not? It will make the profile more informative. 
Yes, agree that can useful, especially for tuning purpose to see how CS inline decision differs from previous build. We wanted to add a metadata (similar to `!CFGChecksum` for pseudo-probe profile) to indicate whether a context is inlined or not. Note that in this case, it would only tell whether bar is inlined along `main:1 @ foo:3`, but not whether `foo` is inlined along `main:1.` What do you think?

Also to keep patch smallish, I think we can add this later separately. 

```
[main:1 @ foo:3 @ bar]:29103:1745
  ...
  ...
!CFGChecksum: ...
!Flag: Inline

```




================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.h:23
+
+class ProfileGenerator {
+
----------------
wmi wrote:
> I thought the tool can also generate profile for current debug info based non CS AFDO but I am not sure. I guess that is a special case handled by CSProfileGenerator. Could you confirm?
Yes, eventually llvm-profgen will support both. Our internal implementation for AFDO profile generation is also llvm based, but it's somewhat separated from this one. And we wanted to do some refactoring before we merge the two. 

That said, agreed that the two can share common interface though I think we could defer that a bit? We will upstream the AFDO profile generation after CSSPGO part is cleared. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89723



More information about the llvm-commits mailing list