[PATCH] D21467: [llc+llvm-mc] Prefer applying -mabi to the triple where possible and allow Mips to take ABI information in the triple.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 06:07:31 PDT 2016


dsanders updated this revision to Diff 63673.
dsanders added a comment.

Changed Triple::getABIVariant() such that it returns a (possibly modified)
triple as well as a (possibly modified) ABI name. This allows it to handle
all three groups of target:

- Those that pass ABI information in both the triple and MCTargetOptions (ARM/PowerPC).
- Mips which passes the ABI in the triple in some respects (mips/mipsel => O32, mips64/mips64el => N32/N64) and in MCTargetOptions only in others (N32 vs N64).**
- Those that that pass ABI information in the triple only (X86/everyone-else)

- This is slightly different to the description I gave last night. Both are accurate but this one is more complete. The main point is that Mips is inconsistent.

At this point Mips is edging into the X86/everyone-else camp. A clang
patch (http://reviews.llvm.org/D21070) and another llvm patch (http://reviews.llvm.org/D21069) are needed to complete that
transition. This will leave us with two groups of targets (ARM/PowerPC, and
Mips/X86/everyone-else) at which point we can start reducing it down to a
single group.

Removed an N32 Android test from test/CodeGen/Mips/ehframe-indirect.ll since N32 isn't supported on Android.


http://reviews.llvm.org/D21467

Files:
  include/llvm/ADT/Triple.h
  lib/Support/Triple.cpp
  lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
  test/CodeGen/Mips/ehframe-indirect.ll
  test/CodeGen/Mips/fp16-promote.ll
  test/MC/Mips/cpsetup.s
  test/MC/Mips/elf_reginfo.s
  test/MC/Mips/mips64-register-names-o32.s
  tools/llc/llc.cpp
  tools/llvm-mc/llvm-mc.cpp
  unittests/ADT/TripleTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21467.63673.patch
Type: text/x-patch
Size: 26201 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160712/a3294ae5/attachment.bin>


More information about the llvm-commits mailing list