<div dir="ltr">I think the general way I'd look at fixing this is:<div><br></div><div>a) migrate to a single TargetMachine in the backend (you've apparently got a patch out for this, but needs reviewing)</div><div>b) migrate to using thumb as a subtarget feature on every function from code generation</div><div>c) autoupgrade modules using a thumb triple to have the thumb attribute on functions (making this patch obsolete)</div><div>d) ... something I'm probably forgetting.</div><div><br></div><div>Thoughts?</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, May 23, 2017 at 4:17 AM Florian Hahn via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">fhahn added a comment.<br>
<br>
@echristo I've uncovered a bug causing `BL` being used to call internal ARM functions from Thumb functions and have put up a patch for that problem: <a href="https://reviews.llvm.org/D33436" rel="noreferrer" target="_blank">https://reviews.llvm.org/D33436</a><br>
<br>
With this patch, multiple runs of the LNT test suite pass built for ARM using a version of clang that randomly adds +thumb-mode to functions.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D33287" rel="noreferrer" target="_blank">https://reviews.llvm.org/D33287</a><br>
<br>
<br>
<br>
</blockquote></div>