Renato Golin via llvm-dev
2020-Sep-09 14:10 UTC
[llvm-dev] [RFC] New Feature Proposal: De-Optimizing Cold Functions using PGO Info
On Wed, 9 Sep 2020 at 14:27, Nemanja Ivanovic <nemanja.i.ibm at gmail.com> wrote:> A more aesthetic comment I have is that personally, I would prefer a > single option with a default percentage (say 0%) rather than having to > specify two options. >0% doesn't mean "don't do it", just means "only do that to functions I didn't see running at all", which could be misrepresented in the profiling run. If we agree this should be *always* enabled, then only one option is needed. Otherwise, we'd need negative percentages to mean "don't do that" and that would be weird. :)> Also, it might be useful to add an option to dump the names of functions > that are decorated so the user can track an execution count of such > functions when running their code. But of course, the debug messages may be > adequate for this purpose. >Remark options should be enough for that. --renato -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200909/71858aca/attachment.html>
Nemanja Ivanovic via llvm-dev
2020-Sep-09 18:26 UTC
[llvm-dev] [RFC] New Feature Proposal: De-Optimizing Cold Functions using PGO Info
On Wed, Sep 9, 2020 at 10:11 AM Renato Golin <rengolin at gmail.com> wrote:> On Wed, 9 Sep 2020 at 14:27, Nemanja Ivanovic <nemanja.i.ibm at gmail.com> > wrote: > >> A more aesthetic comment I have is that personally, I would prefer a >> single option with a default percentage (say 0%) rather than having to >> specify two options. >> > > 0% doesn't mean "don't do it", just means "only do that to functions I > didn't see running at all", which could be misrepresented in the profiling > run. > > If we agree this should be *always* enabled, then only one option is > needed. Otherwise, we'd need negative percentages to mean "don't do that" > and that would be weird. :) > > I am not sure I follow. My suggestion was to have one option that wouldgive you a default of 0% (i.e. only add the attribute on functions that were never called). So the semantics would be fairly straightforward: - Default (i.e. no -profile-deopt-cold): do nothing - Option with no arg (i.e. -profile-deopt-cold): add attribute only to functions that have an execution count of zero - Option with an arg (i.e. -profile-deopt-cold=<N>): add attribute to functions that account for <N>% of total execution counts> >> Also, it might be useful to add an option to dump the names of functions >> that are decorated so the user can track an execution count of such >> functions when running their code. But of course, the debug messages may be >> adequate for this purpose. >> > > Remark options should be enough for that. > > --renato >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200909/4b2a852f/attachment-0001.html>
Renato Golin via llvm-dev
2020-Sep-09 19:10 UTC
[llvm-dev] [RFC] New Feature Proposal: De-Optimizing Cold Functions using PGO Info
On Wed, 9 Sep 2020 at 19:26, Nemanja Ivanovic <nemanja.i.ibm at gmail.com> wrote:> - Default (i.e. no -profile-deopt-cold): do nothing > - Option with no arg (i.e. -profile-deopt-cold): add attribute only to > functions that have an execution count of zero > - Option with an arg (i.e. -profile-deopt-cold=<N>): add attribute to > functions that account for <N>% of total execution counts >I see. This looks confusing to me, but perhaps it's just me. Though, I'm not sure we can get this behaviour from the same flag, as you need to provide a default value if the flag isn't passed (usually boolean or integer, not both).>-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200909/9f840692/attachment.html>
Apparently Analagous Threads
- [RFC] New Feature Proposal: De-Optimizing Cold Functions using PGO Info
- [RFC] New Feature Proposal: De-Optimizing Cold Functions using PGO Info
- [RFC] New Feature Proposal: De-Optimizing Cold Functions using PGO Info
- [RFC] New Feature Proposal: De-Optimizing Cold Functions using PGO Info
- New PowerPC Code Owner