diff options
author | wilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-09-01 11:34:49 +0000 |
---|---|---|
committer | wilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-09-01 11:34:49 +0000 |
commit | 156b069e85e47a97b3c4193584e9385ee500ad29 (patch) | |
tree | b02de5909c79bd9673638eac207a1c2a2d817c11 /gcc/config/nvptx | |
parent | 1c02615cb22c38bd5529b1e236603324b9ae8553 (diff) | |
download | gcc-156b069e85e47a97b3c4193584e9385ee500ad29.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239923 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/nvptx')
0 files changed, 0 insertions, 0 deletions