This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [3/4] SMS: Record moves in the partial schedule
- From: Richard Sandiford <richard dot sandiford at linaro dot org>
- To: Ayal Zaks <ayal dot zaks at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 04 Oct 2011 08:50:06 +0100
- Subject: Re: [3/4] SMS: Record moves in the partial schedule
- References: <OF6AE2D848.53314E9C-ONC2257912.007D2C1A-C2257912.007D3A5D@il.ibm.com> <CAHTt4Ksx3p05xtCEH2rPmnF3WB_1dVdWt=hP7NkbiFjpJGfZ7g@mail.gmail.com> <g44o04litf.fsf@richards-thinkpad.stglab.manchester.uk.ibm.com> <CAHTt4KuLzaX1FiVaT+0u7zCCxD=L46BNn+huurcnw9gsXZTQ8Q@mail.gmail.com> <g4aa9o67mg.fsf@richards-thinkpad.stglab.manchester.uk.ibm.com> <CAHTt4KvhyGiOtY+jP6PGput=3ARUoZXzokf7mjZz3yym0vxi5Q@mail.gmail.com>
Ayal Zaks <ayal.zaks@gmail.com> writes:
> On Wed, Sep 28, 2011 at 4:53 PM, Richard Sandiford
> <richard.sandiford@linaro.org> wrote:
>> Ayal Zaks <ayal.zaks@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