<br><br><div class="gmail_quote">On Tue, Nov 30, 2010 at 2:29 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com">clattner@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div class="im"><br><div><div>On Nov 30, 2010, at 2:19 PM, Xinliang David Li wrote:</div><br><blockquote type="cite"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><div>I understand that, but that implies that you have some model for code locality.  Setting a global code growth limit is (in my opinion) a hack unless you are aiming for the whole program to fit in the icache (which I don't think anyone tries to do :).</div>
</div></div></blockquote><div><br></div><div>Yes, global growth limit may be good for size control, but is a hack for control icache footprint. However, as I mentioned, the bottom up inline scheme make it impossible to use any heuristics involving 'global limit' which can be more complicated and fancier than the simple growth limit.  For instance, there is no restriction that only one global limit can be used ---  the compiler can partition the call graph into multiple locality regions, and set icache limit for each region. The inlining order can be done on a region by region basis. For each region, the region limit is applied and the priority queue must be used.</div>
</span></blockquote><br></div></div><div>Yes, I understand that.  But why is a global limit useful?  What problem does it solve?  If it is to cap "runaway inlining" there are better ways to do it.  You agree that it isn't for icache optimization, so what value does it serve?</div>
</div></blockquote><div><br></div><div>I am not trying to defend 'global growth limit' here :) -- I am arguing the usefulness/flexibility of using a priority based inline ordering. do we agree here?</div><div><br>
</div><div>David</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div><br></div><font color="#888888"><div>
-Chris</div><br></font></div></blockquote></div><br>