<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Sat, Jul 9, 2016 at 7:39 PM Sean Silva <<a href="mailto:chisophugis@gmail.com">chisophugis@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">silvas added a comment.<br>
<br>
In <a href="http://reviews.llvm.org/D21823#479418" rel="noreferrer" target="_blank" class="cremed">http://reviews.llvm.org/D21823#479418</a>, @davidxl wrote:<br>
<br>
> I should have brought it up earlier, but I forgot.    I think a better (and simpler) proposal is to make -fprofile-generate and -fprofile-use turn on IR based PGO.<br>
><br>
> -fprofile-generate and -fprofile-use options were introduced by Diego (cc'ed) recently for GCC option compatibility. At that time, IR based PGO was not yet ready, so they were made aliases to FE instrumentation options -fprofile-instr-generate and -fprofile-instr-use.    Now I think it is time to make it right.   The documentation only says that these two options are gcc compatible options to control profile generation and use, but does not specify the underlying implementation. It is also likely that Google is the only user of this option. If a user using this option really want FE instrumentation, there is always -fprofile-instr-generate to use.  It also more likely that IR instrumentation is what user wants when using GCC compatible options (as they behave more similarly).<br>
<br>
<br>
This SGTM.<br></blockquote><div><br></div><div>Likewise.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
It may cause some user confusion since there is no obvious distinction between "profile generate" and "profile instr generate" from a user perspective. But we can avoid that with improved documentation.<br>
<br>
My main concern is that the existing documentation already says that -fprofile-generate behaves identically to -fprofile-instr-generate <a href="http://clang.llvm.org/docs/UsersManual.html#cmdoption-fprofile-generate" rel="noreferrer" target="_blank" class="cremed">http://clang.llvm.org/docs/UsersManual.html#cmdoption-fprofile-generate</a><br>
However, I think it is reasonable to change this behavior (and of course the documentation), as users of this option are likely using it for compatibility with GCC and so they likely don't care about the specifics of clang FEPGO.<br>
We probably want to at least leave a small note in the documentation regarding this change of behavior.<br></blockquote><div><br></div><div>I think the change in behaviour is needed.  Better to make a clean break now that it is early enough in the PGO life cycle.  Adding a note about it will help current users.</div><div><br></div><div><br></div><div>Diego.</div></div></div>