diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2024-03-03 18:15:58 +0100 |
---|---|---|
committer | Georg-Johann Lay <avr@gjlay.de> | 2024-03-03 18:15:58 +0100 |
commit | c0f5b6caff669037444506cb6008a378356ec209 (patch) | |
tree | 757d6b50f7d89eeeb514258f2becfca1012558ed /gcc/d/expr.cc | |
parent | dae3456965064c9664c097c785ae9bf9fa203fa0 (diff) | |
download | gcc-c0f5b6caff669037444506cb6008a378356ec209.zip gcc-c0f5b6caff669037444506cb6008a378356ec209.tar.gz gcc-c0f5b6caff669037444506cb6008a378356ec209.tar.bz2 |
AVR: ad target/114100 - Don't print unused frame pointer adjustments.
Without -mfuse-add, when fake reg+offset addressing is used, the
output routines are saving some instructions when the base reg
is unused after. This patch adds that optimization for the case
when the base is the frame pointer and the frame pointer adjustments
are split away from the move insn by -mfuse-add in .split2.
Direct usage of reg_unused_after is not possible because that
function looks at the destination of the current insn, which won't
work for offsetting the frame pointer in printing PLUS code.
It can use an extended version of _reg_unused_after though.
gcc/
PR target/114100
* config/avr/avr-protos.h (_reg_unused_after): Remove proto.
* config/avr/avr.cc (_reg_unused_after): Make static. And
add 3rd argument to skip the current insn.
(reg_unused_after): Adjust call of reg_unused_after.
(avr_out_plus_1) [AVR_TINY && -mfuse-add >= 2]: Don't output
unneeded frame pointer adjustments.
Diffstat (limited to 'gcc/d/expr.cc')
0 files changed, 0 insertions, 0 deletions