<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 19, 2016 at 12:01 AM, Sanjoy Das <span dir="ltr"><<a href="mailto:sanjoy@playingwithpointers.com" target="_blank">sanjoy@playingwithpointers.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi David,<span class=""><br>
<br>
Xinliang David Li wrote:<br>
>>  I believe it is primarily used for ordering the visitation of CallSCC's (i.e. SCC's in the "call graph").<br>
> This is what it can do -- but what benefit does it provide?<br>
<br></span>
One benefit is that once you get to a function F that constructs an<br>
instance of a class with virtual functions and then calls a virtual<br>
function on the instance, then the virtual function being called and<br>
the constructor will have been maximally simplified (F refs the<br>
constructor, and the constructor refs all the virtual functions), and<br>
you're more likely to inline the constructor and devirtualize the<br>
call.</blockquote><div><br></div><div>That is true for a graph like <a href="http://reviews.llvm.org/F2073104">http://reviews.llvm.org/F2073104</a> but not one like <a href="http://reviews.llvm.org/F2073479">http://reviews.llvm.org/F2073479</a></div><div>That is, there is no real guarantee.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">  I don't have any real data to back up that this will materially<br>
help, though.</blockquote><div><br></div><div>And we haven't had an RFC for any of this...</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span class=""><font color="#888888"><br>
<br>
-- Sanjoy<br>
</font></span></blockquote></div><br></div></div>