aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/install.texi
diff options
context:
space:
mode:
authorManolis Tsamis <manolis.tsamis@vrull.eu>2023-10-16 13:08:12 -0600
committerJeff Law <jlaw@ventanamicro.com>2023-10-16 13:08:57 -0600
commit04c9cf5c786b94fbe3f6f21f06cae73a7575ff7a (patch)
tree9bea307c51146c9ac3324b16f57d56e958db64e5 /gcc/doc/install.texi
parent964fd402c9b48eb4da91fb3e4e45d4560d6c676c (diff)
downloadgcc-04c9cf5c786b94fbe3f6f21f06cae73a7575ff7a.zip
gcc-04c9cf5c786b94fbe3f6f21f06cae73a7575ff7a.tar.gz
gcc-04c9cf5c786b94fbe3f6f21f06cae73a7575ff7a.tar.bz2
Implement new RTL optimizations pass: fold-mem-offsets
This is a new RTL pass that tries to optimize memory offset calculations by moving them from add immediate instructions to the memory loads/stores. For example it can transform this: addi t4,sp,16 add t2,a6,t4 shl t3,t2,1 ld a2,0(t3) addi a2,1 sd a2,8(t2) into the following (one instruction less): add t2,a6,sp shl t3,t2,1 ld a2,32(t3) addi a2,1 sd a2,24(t2) Although there are places where this is done already, this pass is more powerful and can handle the more difficult cases that are currently not optimized. Also, it runs late enough and can optimize away unnecessary stack pointer calculations. gcc/ChangeLog: * Makefile.in: Add fold-mem-offsets.o. * passes.def: Schedule a new pass. * tree-pass.h (make_pass_fold_mem_offsets): Declare. * common.opt: New options. * doc/invoke.texi: Document new option. * fold-mem-offsets.cc: New file. gcc/testsuite/ChangeLog: * gcc.target/riscv/fold-mem-offsets-1.c: New test. * gcc.target/riscv/fold-mem-offsets-2.c: New test. * gcc.target/riscv/fold-mem-offsets-3.c: New test. * gcc.target/i386/pr52146.c: Adjust expected output. Signed-off-by: Manolis Tsamis <manolis.tsamis@vrull.eu>
Diffstat (limited to 'gcc/doc/install.texi')
0 files changed, 0 insertions, 0 deletions