]> git.ipfire.org Git - thirdparty/gcc.git/commit
AVR: target/107957 - Split multi-byte loads and stores.
authorGeorg-Johann Lay <avr@gjlay.de>
Sun, 1 Dec 2024 16:12:34 +0000 (17:12 +0100)
committerGeorg-Johann Lay <avr@gjlay.de>
Thu, 5 Dec 2024 10:59:53 +0000 (11:59 +0100)
commitb78c0dcb1b6b523880ee193698defca3ebd0b3f7
tree04c57b46604578e4105533fa1d83e906a548b574
parentf7b5527d1b48b33d8ab633c1e9dcb9883667492a
AVR: target/107957 - Split multi-byte loads and stores.

This patch splits multi-byte loads and stores into single-byte
ones provided:

-  New option -msplit-ldst is on (e.g. -O2 and higher), and
-  The memory is non-volatile, and
-  The address space is generic, and
-  The split addresses are natively supported by the hardware.

gcc/
PR target/107957
* config/avr/avr.opt (-msplit-ldst, avropt_split_ldst):
New option and associated var.
* common/config/avr/avr-common.cc (avr_option_optimization_table)
[OPT_LEVELS_2_PLUS]: Turn on -msplit_ldst.
* config/avr/avr-passes.cc (splittable_address_p)
(avr_byte_maybe_mem, avr_split_ldst): New functions.
* config/avr/avr-protos.h (avr_split_ldst): New proto.
* config/avr/avr.md (define_split) [avropt_split_ldst]: Run
avr_split_ldst().
gcc/common/config/avr/avr-common.cc
gcc/config/avr/avr-passes.cc
gcc/config/avr/avr-protos.h
gcc/config/avr/avr.md
gcc/config/avr/avr.opt