diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2016-09-01 11:34:49 +0000 |
---|---|---|
committer | Wilco Dijkstra <wilco@gcc.gnu.org> | 2016-09-01 11:34:49 +0000 |
commit | 491ec0603631fe65b326512c2c424bfb4581e9c8 (patch) | |
tree | b02de5909c79bd9673638eac207a1c2a2d817c11 /gcc/tree-chrec.c | |
parent | f79d87865b55f24f8a7dda9e0c3bb139247d7d21 (diff) | |
download | gcc-491ec0603631fe65b326512c2c424bfb4581e9c8.zip gcc-491ec0603631fe65b326512c2c424bfb4581e9c8.tar.gz gcc-491ec0603631fe65b326512c2c424bfb4581e9c8.tar.bz2 |
This patch adds legitimize_address_displacement hook so that stack accesses...
This patch adds legitimize_address_displacement hook so that stack accesses
with large offsets are split into a more efficient sequence. Unaligned and
TI/TFmode use a 256-byte range, byte and halfword accesses use a 4KB range,
wider accesses use a 16KB range to maximise the available addressing range
and increase opportunities to share the base address.
int f(int x)
{
int arr[8192];
arr[4096] = 0;
arr[6000] = 0;
arr[7000] = 0;
arr[8191] = 0;
return arr[x];
}
Now generates:
sub sp, sp, #32768
add x1, sp, 16384
str wzr, [x1]
str wzr, [x1, 7616]
str wzr, [x1, 11616]
str wzr, [x1, 16380]
ldr w0, [sp, w0, sxtw 2]
add sp, sp, 32768
ret
gcc/
* config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
New function.
(TARGET_LEGITIMIZE_ADDRESS_DISPLACEMENT): Define.
From-SVN: r239923
Diffstat (limited to 'gcc/tree-chrec.c')
0 files changed, 0 insertions, 0 deletions