diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2002-07-05 21:40:16 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2002-07-05 21:40:16 +0000 |
commit | 99ed68ea7fc100ae77cde16219bafc4c693a7d0f (patch) | |
tree | 9a466fed04bd1497fcd54cb4ac7e56f6c6da887b /gcc | |
parent | 581fd392778f0838be5b7869442564f1d3149c33 (diff) | |
download | gcc-99ed68ea7fc100ae77cde16219bafc4c693a7d0f.zip gcc-99ed68ea7fc100ae77cde16219bafc4c693a7d0f.tar.gz gcc-99ed68ea7fc100ae77cde16219bafc4c693a7d0f.tar.bz2 |
genautomata.c (output_max_insn_queue_index_def): Take latencies into account.
2002-07-05 Vladimir Makarov <vmakarov@redhat.com>
* genautomata.c (output_max_insn_queue_index_def): Take latencies
into account.
From-SVN: r55269
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/genautomata.c | 27 |
2 files changed, 28 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a3086e1..39e005b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-07-05 Vladimir Makarov <vmakarov@redhat.com> + + * genautomata.c (output_max_insn_queue_index_def): Take latencies + into account. + 2002-07-06 Stephane Carrez <stcarrez@nerim.fr> * config/m68hc11/m68hc11.md (peephole2): New peephole2 to optimize diff --git a/gcc/genautomata.c b/gcc/genautomata.c index d5a7460..0fddf27 100644 --- a/gcc/genautomata.c +++ b/gcc/genautomata.c @@ -6872,7 +6872,7 @@ process_state_longest_path_length (state) max_dfa_issue_rate = value; } -/* The following nacro value is name of the corresponding global +/* The following macro value is name of the corresponding global variable in the automaton based pipeline interface. */ #define MAX_DFA_ISSUE_RATE_VAR_NAME "max_dfa_issue_rate" @@ -7960,13 +7960,32 @@ output_tables () } /* The function outputs definition and value of PHR interface variable - `max_insn_queue_index' */ + `max_insn_queue_index'. Its value is not less than maximal queue + length needed for the insn scheduler. */ static void output_max_insn_queue_index_def () { - int i; + int i, max, latency; + decl_t decl; - for (i = 0; (1 << i) <= description->max_insn_reserv_cycles; i++) + max = description->max_insn_reserv_cycles; + for (i = 0; i < description->decls_num; i++) + { + decl = description->decls [i]; + if (decl->mode == dm_insn_reserv && decl != advance_cycle_insn_decl) + { + latency = DECL_INSN_RESERV (decl)->default_latency; + if (latency > max) + max = latency; + } + else if (decl->mode == dm_bypass) + { + latency = DECL_BYPASS (decl)->latency; + if (latency > max) + max = latency; + } + } + for (i = 0; (1 << i) <= max; i++) ; if (i < 0) abort (); |