haifa-sched.c: make ready_list an auto_vec<rtx_insn *>

gcc/ChangeLog:

2016-08-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* haifa-sched.c (fix_recovery_deps): Make ready_list a vector.

From-SVN: r239799
This commit is contained in:
Trevor Saunders 2016-08-28 00:03:52 +00:00 committed by Trevor Saunders
parent 4a389eb62b
commit 9cad8a673f
2 changed files with 10 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2016-08-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* haifa-sched.c (fix_recovery_deps): Make ready_list a vector.
2016-08-27 Patrick Palka <ppalka@gcc.gnu.org> 2016-08-27 Patrick Palka <ppalka@gcc.gnu.org>
PR tree-optimization/71077 PR tree-optimization/71077

View File

@ -8600,9 +8600,8 @@ static void
fix_recovery_deps (basic_block rec) fix_recovery_deps (basic_block rec)
{ {
rtx_insn *note, *insn, *jump; rtx_insn *note, *insn, *jump;
rtx_insn_list *ready_list = 0; auto_vec<rtx_insn *, 10> ready_list;
bitmap_head in_ready; bitmap_head in_ready;
rtx_insn_list *link;
bitmap_initialize (&in_ready, 0); bitmap_initialize (&in_ready, 0);
@ -8628,7 +8627,7 @@ fix_recovery_deps (basic_block rec)
sd_delete_dep (sd_it); sd_delete_dep (sd_it);
if (bitmap_set_bit (&in_ready, INSN_LUID (consumer))) if (bitmap_set_bit (&in_ready, INSN_LUID (consumer)))
ready_list = alloc_INSN_LIST (consumer, ready_list); ready_list.safe_push (consumer);
} }
else else
{ {
@ -8645,9 +8644,10 @@ fix_recovery_deps (basic_block rec)
bitmap_clear (&in_ready); bitmap_clear (&in_ready);
/* Try to add instructions to the ready or queue list. */ /* Try to add instructions to the ready or queue list. */
for (link = ready_list; link; link = link->next ()) unsigned int i;
try_ready (link->insn ()); rtx_insn *temp;
free_INSN_LIST_list (&ready_list); FOR_EACH_VEC_ELT_REVERSE (ready_list, i, temp)
try_ready (temp);
/* Fixing jump's dependences. */ /* Fixing jump's dependences. */
insn = BB_HEAD (rec); insn = BB_HEAD (rec);