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

Eric Christopher via llvm-dev llvm-dev at lists.llvm.org
Wed May 31 08:02:32 PDT 2017


On Wed, May 31, 2017 at 6:35 AM Renato Golin <renato.golin at linaro.org>
wrote:

> 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.
>
>
Ultimately either solution is fine with me. If Kristof wanted to switch it
to generic while getting the autodetection stuff up that would also be ok.

-eric


>
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170531/9e1176b6/attachment.html>


More information about the llvm-dev mailing list