<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">On Mon, Apr 20, 2020 at 4:05 AM Sjoerd Meijer via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><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">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I understand the possible benefits of -mtune, but I just don't see how we benefit from a half baked implementation, or a no-op, and leaving the no-op in hoping that one day it will be implemented properly.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I also understand that removing the option could break some builds, but hey, compiler options and defaults change sometimes. In my opinion the cost of migrating would be worth the benefits. But I understand the different angles here, and hey, at least I've
tried now... <span id="gmail-m_4165448784712424962🙂">:-)</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
This is addressing the hard problem of setting optimal compiler options with -target, -march, -mcpu, and -mtune. In this equation -mtune is just a minor annoyance, but if we could get rid of this part of the confusion then that would be a good change to me
and avoid the regular question we get what the -mtune options should be.</div></div></blockquote><div><br></div><div>My naïve opinions FWIW:</div><div>- Personally I have never understood the difference between -target, -march, -mcpu, and -mtune (particularly -march and -mtune). There are a lot of blog posts out there (e.g. <a href="https://lemire.me/blog/2018/07/25/it-is-more-complicated-than-i-thought-mtune-march-in-gcc/">https://lemire.me/blog/2018/07/25/it-is-more-complicated-than-i-thought-mtune-march-in-gcc/</a> <a href="http://sdf.org/~riley/blog/2014/10/30/march-mtune/">http://sdf.org/~riley/blog/2014/10/30/march-mtune/</a> ) indicating that I'm not alone.  (Anyone got a really good resource on this topic?)</div><div>- It sounds like -mtune's behavior is not "falsifiable"; it can never produce "wrong" code; it's purely an optimization option, like -O2. So there is no practical difference, but there may be a psychological difference, between saying "Clang permanently treats -mtune as a no-op" versus "Clang has a remarkably low <i><b>quality of implementation</b></i> for -mtune, and has no immediate plans to either improve or regress it."</div>- I don't think Clang should do anything actively to break scripts/Makefiles that invoke both GCC and Clang as "$(CXX) -mtune=...". That would be a downside with no upside.</div><div class="gmail_quote"><br></div><div class="gmail_quote">my $.02,</div><div class="gmail_quote">–Arthur</div></div></div></div></div>