<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi Tim and Peter,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Thanks for your comments! Yes, I now see now that with GCC, the ARM/Thumb state does not depends on optimisation levels, but it is a toolchain default (I've learned something today! :-)).</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">But I guess it doesn't change much about my observations:</p>
<p style="margin-top:0;margin-bottom:0">- we have an inconsistency/discrepancy between GCC's and Clang/LLVM's behaviour,</p>
<p style="margin-top:0;margin-bottom:0">- and most likely Clang's default behaviour, for a native toolchain users which I am now, gives surprising and perhaps undesired results. I.e., the equivalent of GCC's "gcc -Os", which is "clang -Oz", doesn't really do
what I want/expect. And being a native toolchain user is quite important here, because that means I don't expect it would be necessary to provide --target and then provide some triple to get me Thumb when I've already specified -Oz (but perhaps I am totally
wrong here).</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I agree now that changing Thumb/ARM state depending on optimisation levels might be confusing and not worth the effort, but that leaves me wondering what our options are (not a rhetorical question). I guess that is:</p>
<p style="margin-top:0;margin-bottom:0">1) keep it as it is (I haven't looked at the docs yet, but perhaps document this better if necessary), or</p>
<p style="margin-top:0;margin-bottom:0">2) adopt GCC's behaviour and flip the default?</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Cheers,</p>
<p style="margin-top:0;margin-bottom:0">Sjoerd.<br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Tim Northover <t.p.northover@gmail.com><br>
<b>Sent:</b> 15 November 2018 16:48:38<br>
<b>To:</b> Peter Smith<br>
<b>Cc:</b> Sjoerd Meijer; LLVM Developers Mailing List; nd<br>
<b>Subject:</b> Re: [llvm-dev] [cfe-dev] [RFC][ARM] -Oz implies -mthumb</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Thu, 15 Nov 2018 at 14:27, Peter Smith via llvm-dev<br>
<llvm-dev@lists.llvm.org> wrote:<br>
> My vote is not imply ARM/Thumb state changes with optimization<br>
> options. We've already got two ways to do it --target=thumb-none-eabi,<br>
> --target=arm-none-eabi and -mthumb/-marm I think the potential<br>
> confusion outweighs the potential benefit. I'm just one voice though.<br>
<br>
I agree with that.<br>
<br>
Tim.<br>
</div>
</span></font></div>
</body>
</html>