[llvm-dev] [RFC] Making -mcpu=generic the default for ARM armv7a and arm8a rather than -mcpu=cortex-a8 or -mcpu=cortex-a53

Renato Golin via llvm-dev llvm-dev at lists.llvm.org
Wed May 31 06:35:30 PDT 2017


On 31 May 2017 at 13:57, Kristof Beyls <Kristof.Beyls at arm.com> wrote:
> Taking into account the above measurements, my conclusions are:
> 1. We should make -mcpu=generic the default cpu, not Cortex-A8 or Cortex-A53
> for march=armv7a and march=armv8a.

Using -mcpu=native makes more sense to me, if at all possible to
detect, falling back to generic, which doesn't hurt.


> 2. We probably want to let the compiler schedule instructions using the
> Cortex-A8 pipeline model for -mcpu=generic, since it gives a bit of speedup
> on all cores tested.

Same here, I'd use the schedule of the detected CPU, if any, or fall
back to A8 (which seems fine).

But yeah, it's time we get rid of the A8/A53 defaults.

While we're at it, we may think about ARMv7's NEON default. Generating
only VFP is slower on boards with NEON, but generating NEON crashes
with SIGILL on borads that don't have it.

I'd be happy if Clang could detect CPU/FPU and set the flags
accordingly, or fall back to "generic"/A8-schedule/VFP defaults.

cheers,
--renato


More information about the llvm-dev mailing list