paulkirth added a comment.

In D65300#1601733 <https://reviews.llvm.org/D65300#1601733>, @xbolva00 wrote:

> Nice work!


Glad to hear you like it.

> It would be nice if we also have “-fsuggest-expect” so we could fix perf 
> issues thanks to PGO counters even for non-PGO builds. What do you think?

Supporting suggestions is something we're planning to do in the future. Non-PGO 
builds are even the main motivation. I wanted to get this logic correct first, 
and make sure that we're handling all the odd edge cases before making new 
suggestions. I feel like our approach is really straightforward, but some 
things in clang are spread out in surprising ways or have interactions I've 
been surprised to find. That said, if finding problematic usage is done 
correctly, then reversing the logic to make a suggestions about useful 
annotations should be pretty easy.

I still need to give some thought to how to express the right balance between 
execution count and frequency when suggesting new annotations, so that the user 
won't be overwhelmed with suggestions. I'm not sure that branch weights by 
themselves are sufficient for that use-case, but we should be able to come up 
with something that behaves reasonably well without too much trouble.


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

https://reviews.llvm.org/D65300



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to