From: Trevor Saunders Date: Sun, 28 Aug 2016 00:03:52 +0000 (+0000) Subject: haifa-sched.c: make ready_list an auto_vec X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9cad8a673f30b657218eb73565b992ba203a2581;p=gcc.git haifa-sched.c: make ready_list an auto_vec gcc/ChangeLog: 2016-08-27 Trevor Saunders * haifa-sched.c (fix_recovery_deps): Make ready_list a vector. From-SVN: r239799 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cb259a07fab..2cfb164882e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2016-08-27 Trevor Saunders + + * haifa-sched.c (fix_recovery_deps): Make ready_list a vector. + 2016-08-27 Patrick Palka PR tree-optimization/71077 diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 84e42c0ac9b..c58b0ad399f 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -8600,9 +8600,8 @@ static void fix_recovery_deps (basic_block rec) { rtx_insn *note, *insn, *jump; - rtx_insn_list *ready_list = 0; + auto_vec ready_list; bitmap_head in_ready; - rtx_insn_list *link; bitmap_initialize (&in_ready, 0); @@ -8628,7 +8627,7 @@ fix_recovery_deps (basic_block rec) sd_delete_dep (sd_it); if (bitmap_set_bit (&in_ready, INSN_LUID (consumer))) - ready_list = alloc_INSN_LIST (consumer, ready_list); + ready_list.safe_push (consumer); } else { @@ -8645,9 +8644,10 @@ fix_recovery_deps (basic_block rec) bitmap_clear (&in_ready); /* Try to add instructions to the ready or queue list. */ - for (link = ready_list; link; link = link->next ()) - try_ready (link->insn ()); - free_INSN_LIST_list (&ready_list); + unsigned int i; + rtx_insn *temp; + FOR_EACH_VEC_ELT_REVERSE (ready_list, i, temp) + try_ready (temp); /* Fixing jump's dependences. */ insn = BB_HEAD (rec);