On 10/19/07, David Miller <[EMAIL PROTECTED]> wrote:
> From: "Seongbae Park (박성배, 朴成培)" <[EMAIL PROTECTED]>
> Date: Tue, 16 Oct 2007 22:56:49 -0700
>
> > Did you replace the DF_REF_REG_USE with DEF ?
> > If so, that's not correct.  We need to add DEF as well as USE:
>  ...
> > Then, we'll need to change the df_invalidated_by_call loop
> > not to add global_regs[] again (with MAY_CLOBBER bits).
>
> Seongbae-ssi, I've done full regstraps of mainline with the
> following patch on sparc-linux-gnu and sparc64-linux-gnu.

I've been testing this on x86-64 on top of 4.3,
and I see one regression in libgomp which I'm trying to find out
whether it's this patch or some other external cause.

> Do you mind if I check in this fix?  I would also like to
> pursue getting this installed on the gcc-4.2 branch as well,
> as I stated I've already done several regstraps of the 4.2
> backport of this fix as well.

If you're not in a hurry, can you wait
till I run the regtest against 4.2 on x86-64 ?
I've already discussed the patch with Kenny
and we agreed that this is the right approach,
but I'd like to see the clean regtest on x86 for both 4.2 and 4.3
before I approve.
Thanks,

Seongbae

> Thank you.
>
> 2007-10-18  Seongbae Park <[EMAIL PROTECTED]>
>         David S. Miller  <[EMAIL PROTECTED]>
>
>         * df-scan.c (df_get_call_refs): Mark global registers as both a
>         DF_REF_REG_USE and a non-clobber DF_REF_REG_DEF.
>
> --- df-scan.c.ORIG      2007-10-18 16:56:19.000000000 -0700
> +++ df-scan.c   2007-10-18 16:56:50.000000000 -0700
> @@ -3109,18 +3109,22 @@
>       so they are recorded as used.  */
>    for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
>      if (global_regs[i])
> -      df_ref_record (collection_rec, regno_reg_rtx[i],
> -                    NULL, bb, insn, DF_REF_REG_USE, flags);
> +      {
> +       df_ref_record (collection_rec, regno_reg_rtx[i],
> +                      NULL, bb, insn, DF_REF_REG_USE, flags);
> +       df_ref_record (collection_rec, regno_reg_rtx[i],
> +                      NULL, bb, insn, DF_REF_REG_DEF, flags);
> +      }
>
>    is_sibling_call = SIBLING_CALL_P (insn);
>    EXECUTE_IF_SET_IN_BITMAP (df_invalidated_by_call, 0, ui, bi)
>      {
> -      if ((!bitmap_bit_p (defs_generated, ui))
> +      if (!global_regs[ui]
> +         && (!bitmap_bit_p (defs_generated, ui))
>           && (!is_sibling_call
>               || !bitmap_bit_p (df->exit_block_uses, ui)
>               || refers_to_regno_p (ui, ui+1,
>                                     current_function_return_rtx, NULL)))
> -
>          df_ref_record (collection_rec, regno_reg_rtx[ui],
>                        NULL, bb, insn, DF_REF_REG_DEF, DF_REF_MAY_CLOBBER | 
> flags);
>      }

Reply via email to