On Mon, 23 Apr 2018, Alexander Monakov wrote:

> As discussed in the cover letter, the code removed in this patch is 
> unnecessary,
> references to global reg vars from inline asms do not work reliably, and so we
> should simply require that inline asms use constraints to make such references
> properly visible to the compiler.
> 
> Bootstrapped/regtested on powerpc64, will retest on ppc64le and x86 in stage 
> 1.
> 
>         PR rtl-optimization/79985
>       * df-scan.c (df_insn_refs_collect): Remove special case for
>         global registers and asm statements.

Ping. I've retested once on ppc64le since posting.

> ---
>  gcc/df-scan.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/gcc/df-scan.c b/gcc/df-scan.c
> index 95e1e0df2d5..cbb08fc36ae 100644
> --- a/gcc/df-scan.c
> +++ b/gcc/df-scan.c
> @@ -3207,17 +3207,6 @@ df_insn_refs_collect (struct df_collection_rec 
> *collection_rec,
>    if (CALL_P (insn_info->insn))
>      df_get_call_refs (collection_rec, bb, insn_info, flags);
>  
> -  if (asm_noperands (PATTERN (insn_info->insn)) >= 0)
> -    for (unsigned i = 0; i < FIRST_PSEUDO_REGISTER; i++)
> -      if (global_regs[i])
> -       {
> -         /* As with calls, asm statements reference all global regs. */
> -         df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i],
> -                        NULL, bb, insn_info, DF_REF_REG_USE, flags);
> -         df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i],
> -                        NULL, bb, insn_info, DF_REF_REG_DEF, flags);
> -       }
> -
>    /* Record other defs.  These should be mostly for DF_REF_REGULAR, so
>       that a qsort on the defs is unnecessary in most cases.  */
>    df_defs_record (collection_rec,
> 

Reply via email to