[llvm-bugs] [Bug 29030] New: Generic ARM cpu targets

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 17 20:23:10 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=29030

            Bug ID: 29030
           Summary: Generic ARM cpu targets
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: yyc1992 at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Compare to other backend like x86 and ppc, the ARM/AArch64 CPU list/detection
seems to be missing support for generic archs. Examples of such in the x86
backends includes `core-avx2`, `x86_64`. OTOH, the CPU list in ARM only seems
to include specific CPU parts and core designs but it doesn't include generic
archs like armv7 etc. It would be nice to allow these arch names to be
specified as the CPU names too.

The native target detection doesn't seem to have a nice fallback to handle this
either. A few options that can be used to detect this on linux.
1. the `model name` or `Processor` field of `cpuinfo` contains `elf_platform`,
which should be a good lower bound on arch the current CPU supports. (The field
changed name between 3.10 and 4.0 though....).
2. the `CPU Archetecture`, `CPU Variant` fields can be used too.
3. `utcname::machine` returned by `uname()` is also the `elf_platform` should
be more reliable than reading `cpuinfo`.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160818/16dcb5ca/attachment.html>


More information about the llvm-bugs mailing list