<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Oct 26, 2017 at 11:00 AM Matthias Braun <<a href="mailto:mbraun@apple.com">mbraun@apple.com</a>> wrote:<br></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>Sounds sensible. I'd be happy to look at detailed patches.</div><div><br></div><div>I'd like to point out that target features are already used for tuning settings today (and that's fine I think). So maybe this doesn't need to be much more than just an extra way to initialize target features.</div></div><div style="word-wrap:break-word"><div><br></div></div></blockquote><div><br></div><div>It is, I'd like to move the tuning parameters aside and basically initialize tune to arch/cpu (why ARM? why?) if it's not already set :)</div><div><br></div><div>-eric</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></div><div>- Matthias</div><div><br></div></div><div style="word-wrap:break-word"><div><blockquote type="cite"><div>On Oct 20, 2017, at 3:16 PM, Eric Christopher via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="m_8450553272759377282Apple-interchange-newline"></blockquote></div></div><div style="word-wrap:break-word"><div><blockquote type="cite"><div><div dir="ltr">Hi All,<div><br></div><div>I've gotten a few notes over the last few months and also given some of the recent changes to various backends to "update" the default tunings for a generic processor it made me think again about adding support for tuning to a processor rather than generating processor specific code - hence, mtune. I hope this is rather uncontroversial, but happy to discuss at length if anyone thinks we shouldn't add this functionality to the compiler.</div><div><br></div><div>That said, I have a bit of a strawman outline for what I think needs to happen in general, and while I don't have any concrete plans to attack this soon I thought I'd post it in case someone else was interested:</div><div><br></div><div><span style="color:rgb(33,33,33);font-size:13px">a) split out (in targets where we care) code generation features from tuning features on a per subtarget basis into a separate set of features</span><br style="color:rgb(33,33,33);font-size:13px"><span style="color:rgb(33,33,33);font-size:13px">b) add support for initializing them based on a tune parameter to the subtarget</span><br style="color:rgb(33,33,33);font-size:13px"><span style="color:rgb(33,33,33);font-size:13px">c) add support to clang for generating the tune parameter on a per function basis</span><br style="color:rgb(33,33,33);font-size:13px"></div><div><span style="color:rgb(33,33,33);font-size:13px">d) Use them in TTI and various other backend hooks rather than any code gen specific ones.</span></div><div><span style="color:rgb(33,33,33);font-size:13px"><br></span></div><div><span style="color:rgb(33,33,33);font-size:13px">Simple right? :) I'm happy to elaborate here, but I believe the work is relatively straight forward if a lot of typing.</span></div><div><span style="color:rgb(33,33,33);font-size:13px"><br></span></div><div><span style="color:rgb(33,33,33);font-size:13px">Every step there is likely to be a lot more complicated, but similar to the getSubtarget<>/getSubtargetImpl changes it should be very easy to do on any particular backend and fan out support there. Just make sure that clang knows which targets do and don't support the flag.</span></div><div><br></div><div>Happy to help or review work here.</div><div><br></div><div>Thanks!</div><div><br></div><div>-eric</div></div></div></blockquote></div></div><div style="word-wrap:break-word"><div><blockquote type="cite"><div>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br></div></blockquote></div></div></blockquote></div></div>