<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Fri, Aug 12, 2016 at 12:15 PM, Xinliang David Li via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">+dehao.<div><br></div><div>There are two potential problems:</div><div><br></div><div>1) the branch gets eliminated in the binary that is being profiled, so there is no profile data</div></div></blockquote><div><br></div><div>This seems like a fundamental problem for PGO. Maybe it is also responsible for this bug: <a href="https://llvm.org/bugs/show_bug.cgi?id=27359">https://llvm.org/bugs/show_bug.cgi?id=27359</a> ?<br></div><div> <br></div><div>Should we limit select optimizations in IR for a PGO-training build? Or should there be a 'select smasher' pass later in the pipeline that turns selects into branches for a PGO-training build? (I don't have a good understanding of PGO, so I'm just throwing out ideas...maybe a better question is: how do other compilers handle this?)<br></div></div><br></div></div>