[PATCH] [AArch64] Improve and enable the SeparateConstOffsetFromGEP for AArch64 backend.

James Molloy james at jamesmolloy.co.uk
Mon Oct 27 08:38:01 PDT 2014


Hi Hao,

I'm not sure about this. Firstly I have concerns about the statistical
significance of the difference in results - we've seen swings of +/- 1% on
A57, and here we're talking about a 0.5% difference. Are you satisfied that
the difference is genuine?

Secondly, I don't see a good reason why useAA should be worse than !useAA.
To my mind, if there is a regression when useAA is enabled, it should be
one of two things:
  1) A legitimate regression, in which case let's fix useAA!
  2) Random code permutation outside of the compiler's model. If this is
the case we shouldn't be adjusting the compiler to compensate.

useAA has the potential to improve codegen. We're not really using it at
the moment, but it's good that it's available to use in the future. If we
rip it out, we should have a good reason for it, I think!

Can I suggest that you make the initial commit, which improves performance,
then have a look at why !useAA is better and fix that incrementally?

Cheers,

James

On 27 October 2014 08:28, Hao Liu <Hao.Liu at arm.com> wrote:

> The performance result shows disable useAA for CortexA57 can have more
> improvement. The performance improvement result for latest trunk with this
> patch on CortexA57 are as follows:
> Version 1 enable useAA() for CortexA57:
>     spec.cpu2006.ref.444_namd   -4.56%
>     spec.cpu2006.ref.473_astar  -3.79%
>     spec.cpu2006.ref.445_gobmk  -2.91%
> Version 2 disable useAA() for CortexA57:
>     spec.cpu2006.ref.473_astar  -4.84%
>     spec.cpu2006.ref.444_namd   -4.39%
>     spec.cpu2006.ref.445_gobmk  -2.80%
> Both versions have obvious benefit. But the result on astar of version 2
> is much better than version 1. So I've attached a patch removing CortexA57
> from useAA(). useAA() is beneficial for in-order target, but it has no
> obvious improvement on out of order cpu. Currently cyclone, x86 also
> doesn't useAA(). So I think we don't need useAA for CortexA57.
>
> http://reviews.llvm.org/D5864
>
> Files:
>   include/llvm/Transforms/Scalar.h
>   lib/Target/AArch64/AArch64Subtarget.h
>   lib/Target/AArch64/AArch64TargetMachine.cpp
>   lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
>   test/CodeGen/AArch64/aarch64-gep-opt.ll
>   test/CodeGen/AArch64/arm64-addr-mode-folding.ll
>   test/CodeGen/AArch64/arm64-cse.ll
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141027/1540da3e/attachment.html>


More information about the llvm-commits mailing list