diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2024-08-11 15:18:22 +0200 |
---|---|---|
committer | Georg-Johann Lay <avr@gjlay.de> | 2024-08-11 15:38:30 +0200 |
commit | 29a323676913600b448e011c7d27df01aa20c6dc (patch) | |
tree | 939d537301c10b2d887110cfdf512b8a49549433 | |
parent | 19c9ba0a659171d5d7a34629d05010121604df66 (diff) | |
download | gcc-29a323676913600b448e011c7d27df01aa20c6dc.zip gcc-29a323676913600b448e011c7d27df01aa20c6dc.tar.gz gcc-29a323676913600b448e011c7d27df01aa20c6dc.tar.bz2 |
AVR: Add function avr.cc::ra_in_progress().
It returns lra_in_progress resp. reload_in_progress depending on avr_lra_p.
Currently, direct use of ra_in_progress() is only made with -mlog=.
gcc/
* config/avr/avr.cc (ra_in_progress): New static function.
(avr_legitimate_address_p, avr_addr_space_legitimate_address_p)
(extra_constraint_Q): Use it with -mlog=.
-rw-r--r-- | gcc/config/avr/avr.cc | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/gcc/config/avr/avr.cc b/gcc/config/avr/avr.cc index 27df4bc..8d59a6b 100644 --- a/gcc/config/avr/avr.cc +++ b/gcc/config/avr/avr.cc @@ -330,6 +330,13 @@ avr_adiw_reg_p (rtx reg) } +static bool +ra_in_progress () +{ + return avr_lra_p ? lra_in_progress : reload_in_progress; +} + + namespace { static const pass_data avr_pass_data_recompute_notes = @@ -3560,8 +3567,8 @@ avr_legitimate_address_p (machine_mode mode, rtx x, bool strict) if (avr_log.legitimate_address_p) { avr_edump ("\n%?: ret=%d, mode=%m strict=%d " - "reload_completed=%d reload_in_progress=%d %s:", - ok, mode, strict, reload_completed, reload_in_progress, + "reload_completed=%d ra_in_progress=%d %s:", + ok, mode, strict, reload_completed, ra_in_progress (), reg_renumber ? "(reg_renumber)" : ""); if (GET_CODE (x) == PLUS @@ -13973,8 +13980,8 @@ extra_constraint_Q (rtx x) || xx == arg_pointer_rtx); if (avr_log.constraints) - avr_edump ("\n%?=%d reload_completed=%d reload_in_progress=%d\n %r\n", - ok, reload_completed, reload_in_progress, x); + avr_edump ("\n%?=%d reload_completed=%d ra_in_progress=%d\n %r\n", + ok, reload_completed, ra_in_progress (), x); } return ok; @@ -15038,8 +15045,8 @@ avr_addr_space_legitimate_address_p (machine_mode mode, rtx x, bool strict, if (avr_log.legitimate_address_p) { avr_edump ("\n%?: ret=%b, mode=%m strict=%d " - "reload_completed=%d reload_in_progress=%d %s:", - ok, mode, strict, reload_completed, reload_in_progress, + "reload_completed=%d ra_in_progress=%d %s:", + ok, mode, strict, reload_completed, ra_in_progress (), reg_renumber ? "(reg_renumber)" : ""); if (GET_CODE (x) == PLUS |