ds_t ts;
sd_iterator_def sd_it;
dep_t dep;
- rtx_insn_list *twins = NULL;
+ auto_vec<rtx_insn *, 10> twins;
ts = TODO_SPEC (insn);
gcc_assert (!(ts & ~BE_IN_SPEC));
fprintf (spec_info->dump, ";;\t\tGenerated twin insn : %d/rec%d\n",
INSN_UID (twin), rec->index);
- twins = alloc_INSN_LIST (twin, twins);
+ twins.safe_push (twin);
/* Add dependences between TWIN and all appropriate
instructions from REC. */
/* We couldn't have added the dependencies between INSN and TWINS earlier
because that would make TWINS appear in the INSN_BACK_DEPS (INSN). */
- while (twins)
+ unsigned int i;
+ rtx_insn *twin;
+ FOR_EACH_VEC_ELT_REVERSE (twins, i, twin)
{
- rtx_insn *twin;
- rtx_insn_list *next_node;
-
- twin = twins->insn ();
-
- {
- dep_def _new_dep, *new_dep = &_new_dep;
+ dep_def _new_dep, *new_dep = &_new_dep;
- init_dep (new_dep, insn, twin, REG_DEP_OUTPUT);
- sd_add_dep (new_dep, false);
- }
-
- next_node = twins->next ();
- free_INSN_LIST_node (twins);
- twins = next_node;
+ init_dep (new_dep, insn, twin, REG_DEP_OUTPUT);
+ sd_add_dep (new_dep, false);
}
calc_priorities (priorities_roots);