<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, May 23, 2017 at 10:36 AM Florian Hahn via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On 23/05/2017 18:20, Eric Christopher wrote:<br>
> I think the general way I'd look at fixing this is:<br>
><br>
> a) migrate to a single TargetMachine in the backend (you've apparently<br>
> got a patch out for this, but needs reviewing)<br>
<br>
Yep, <a href="https://reviews.llvm.org/D33318" rel="noreferrer" target="_blank">https://reviews.llvm.org/D33318</a> but that's more of a cleanup and<br>
should be a NFC.<br>
<br>
> b) migrate to using thumb as a subtarget feature on every function from<br>
> code generation<br>
<br>
I've just put up a clang patch that should do that<br>
<a href="https://reviews.llvm.org/D33448" rel="noreferrer" target="_blank">https://reviews.llvm.org/D33448</a><br>
<br>
> c) autoupgrade modules using a thumb triple to have the thumb attribute<br>
> on functions (making this patch obsolete)<br>
<br>
What would be the best place for this upgrade be? I think we still have<br>
to update Triple::isCompatible to allow linking armxx and thumbxx<br>
triples. I'll update this patch tomorrow.<br></blockquote><div><br>The upgrade would be in the bitcode loader. Check the various other upgrade paths here:<br><p class="inbox-inbox-p1"><span class="inbox-inbox-s1"> lib/Bitcode/Reader/MetadataLoader.cpp<br><br>There shouldn't be any need for the triple to exist beyond the bitcode reader (not sure how low level it is, whether the triple's existence could truly be isolated to that one file - so it might not be quite that perfect/simple). The IR linker shouldn't ever see the old triple - because it'd be upgraded while the bitcode is being loaded.<br><br>All the existing textual IR can be updated whenever the attribute support is in (if we're in a hybrid state of supporting both the attribute and the triple) - mass migrating all the textual IR test cases over to the new syntax (common triple, thumb attribute) - sed and python can be handy for automating that process (at least in my experience).</span></p> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> d) ... something I'm probably forgetting.<br>
<br>
I've also put up a patch fixing a problem with mixing Thumb and ARM<br>
functions in a single compilation unit <a href="https://reviews.llvm.org/D33436" rel="noreferrer" target="_blank">https://reviews.llvm.org/D33436</a><br>
<br>
<br>
<br>
(b) and (c) would also be a first step towards getting rid of the<br>
thumbxx triples, as David suggested, although thumbxx triples are<br>
currently the only way to specify that all functions in a compilation<br>
unit have +thumb-mode in the llvm binaries AFAIK.<br></blockquote><div><br>Right - hence starting with the fix to add the attribute everywhere and to upgrade the triple to attributes.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div>