Ayal Zaks <ayal.z...@gmail.com> writes: > On Wed, Sep 28, 2011 at 4:53 PM, Richard Sandiford > <richard.sandif...@linaro.org> wrote: >> Ayal Zaks <ayal.z...@gmail.com> writes: >>>>> Only request is to document that the register moves are >>>>> placed/assigned-id's in a specific order. >>>> >>>>I suppose this is the downside of splitting the patches up, sorry, >>>>but the ids are only ordered for the throw-away loop: >>>> >>>> FOR_EACH_VEC_ELT_REVERSE (ps_reg_move_info, ps->reg_moves, i, move) >>>> add_insn_before (move->insn, ps_first_note (ps, move->def), NULL); >>>> >>>>and for the prologue/epilogue code. Both are replaced in patch 4 >>>>with code that doesn't rely on the ordering of ids. >>> Ok then, very well. I was mostly referring to the following in >>> prologue/epiloque code, which merely relies on assigning all regmoves >>> of a node consecutive id's: >> >> FWIW, the 4/4 that I just posted did finally get rid of the first_reg_move >> & nreg_moves fields. >> >> Here's a slightly updated patch in line with your 4/4 comments. >> The move->def is now always the id of the predecessor, rather than >> the id of the original ddg node producer. I've adapted the throw-away >> loop accordingly, but there are no other changes. >> > > This is ok.
Thanks. > Just to make sure I follow, the changes were (for this patch): > > 1. setting up a different move->def for each move > >> + move->def = i_reg_move > 0 ? first_move + i_reg_move - 1 : i; > > instead of the same original def for all > >> + move->def = i; > > 2. inserting each move right before its own def, bottom-up: > >> + FOR_EACH_VEC_ELT (ps_reg_move_info, ps->reg_moves, i, move) >> + add_insn_before (move->insn, ps_first_note (ps, move->def), NULL); > > instead of inserting each move right before the original def, top-down: > >>>> FOR_EACH_VEC_ELT_REVERSE (ps_reg_move_info, ps->reg_moves, i, move) >>>> add_insn_before (move->insn, ps_first_note (ps, move->def), NULL); Yeah, those were the ones. Richard