<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-07-25 22:36 GMT-07:00 Mehdi AMINI <span dir="ltr"><<a href="mailto:joker.eph@gmail.com" target="_blank">joker.eph@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">2017-07-24 16:14 GMT-07:00 Quentin Colombet via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span>:<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 dir="auto" style="word-wrap:break-word">Hi River,</div><div dir="auto" style="word-wrap:break-word"><br><div><span><blockquote type="cite"><div>On Jul 24, 2017, at 2:36 PM, River Riddle <<a href="mailto:riddleriver@gmail.com" target="_blank">riddleriver@gmail.com</a>> wrote:</div><br class="m_3876060486624896131m_-3236575054360144803Apple-interchange-newline"><div><div dir="ltr">Hi Quentin,<div> I appreciate the feedback. When I reference the cost of Target Hooks it's mainly for maintainability and cost on a target author. We want to keep the intrusion into target information minimized. The heuristics used for the outliner are the same used by any other IR level pass seeking target information, i.e TTI for the most part. I can see where you are coming from with "<span style="font-size:12.8px">having heuristics solely focused on code size do not seem realistic", but I don't agree with that statement.</span></div></div></div></blockquote><div><br></div></span><div>If you only want code size I agree it makes sense, but I believe, even in Oz, we probably don’t want to slow the code by a big factor for a couple bytes. That’s what I wanted to say and what I wanted to point out is that you need to have some kind of model for the performance to avoid those worst cases. Unless we don’t care :).</div></div></div></div></blockquote><div><br></div></span><div>That's why we have threshold though, don't we? </div><div>Also the IR makes it easy to connect to PGO, which allows to focus the outlining on "cold" regions and preserve good performance.</div><div>River: did you consider this already? Having a good integration with PGO could make this part of the default optimization pipeline (i.e. having a mode where we outline only the knowingly "cold" code).</div><span class=""><div><br></div><div><br></div><div><br></div><div><br></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 dir="auto" style="word-wrap:break-word"><div><span><br><blockquote type="cite"><div><div dir="ltr"><div><span style="font-size:12.8px"> I think there is a disconnect on heuristics. The only user tunable parameters are the lower bound parameters(to the cost model), the actual analysis(heuristic calculation) is based upon TTI information. </span></div></div></div></blockquote><div><br></div></span><div>I don’t see how you can get around adding more hooks to know how a specific function prototype is going to be lowered (e.g., i64 needs to be split into two registers, fourth and onward parameters need to be pushed on the stack and so on). Those change the code size benefit.</div></div></div></div></blockquote><div><br></div></span><div>How is the inliner doing? How are we handling Oz there?</div><div>If we are fine living with approximation for the inliner, why wouldn't the same work for an outliner?</div><span class=""><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 dir="auto" style="word-wrap:break-word"><div><span><br><blockquote type="cite"><div><div dir="ltr"><div><span style="font-size:12.8px"> There are several comparison benchmarks given in the "More detailed performance data" of the original RFC. It includes comparisons to the Machine Outliner when possible(I can't build clang on Linux with Machine Outliner). I welcome any and all discussion on the placement of the outliner in LLVM.<br></span></div></div></div></blockquote><div><br></div></span><div>My fear with a new framework is that we are going to split the effort for pushing the outliner technology forward and I’d like to avoid that if at all possible.</div></div></div></div></blockquote><div><br></div></span><div>It isn't clear to me that implementing it at the MachineLevel was the right trade-off in the first place.</div><div>I'm not sure a full comparative study was performed and discussed upstream at the time where the MachineIR outliner was implemented? If so it wouldn't be fair to ask this to River now.</div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span></div></div></div></blockquote><div><br></div><div>Forgot to mention another aspect doing this it early may improve compile time because we will reduce the amount of IR to codegen. </div><div><br></div><div>-- </div><div>Mehdi</div><div><br></div></div></div></div>