diff options
author | Manos Anagnostakis <manos.anagnostakis@vrull.eu> | 2023-09-14 17:58:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-14 16:58:39 +0200 |
commit | 008f26b12e348a07228d7c61304bb22f13a1e7fb (patch) | |
tree | 7dead91896d4521b9198bb7d8786dbd3eecd5641 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | b7d02d7e12f96c9c9a735a0255c2b5600fc16067 (diff) | |
download | llvm-008f26b12e348a07228d7c61304bb22f13a1e7fb.zip llvm-008f26b12e348a07228d7c61304bb22f13a1e7fb.tar.gz llvm-008f26b12e348a07228d7c61304bb22f13a1e7fb.tar.bz2 |
[AArch64] New subtarget features to control ldp and stp formation (#66098)
On some AArch64 cores, including Ampere's ampere1 and ampere1a
architectures, load and store pair instructions are faster compared to
simple loads/stores only when the alignment of the pair is at least
twice that of the individual element being loaded.
Based on that, this patch introduces four new subtarget features, two
for controlling ldp and two for controlling stp, to cover the ampere1
and ampere1a alignment needs and to enable optional fine-grained control
over ldp and stp generation in general. The latter can be utilized by
another cpu, if there are possible benefits
with a different policy than the default provided by the compiler.
More specifically, for each of the ldp and stp respectively we have:
- disable-ldp/disable-stp: Do not emit ldp/stp.
- ldp-aligned-only/stp-aligned-only: Emit ldp/stp only if the source
pointer is aligned to at least double the alignment of the type.
Therefore, for -mcpu=ampere1 and -mcpu=ampere1a
ldp-aligned-only/stp-aligned-only become the defaults, because of the
benefit from the alignment, whereas for the rest of the cpus the default
behaviour of the compiler is maintained.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions