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: unassignedb...@nondot.org
          Reporter: yyc1...@gmail.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to