This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Ignore hard register uses in DEBUG_INSNs for regs_ever_live (PR bootstrap/52397)
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Alexandre Oliva <aoliva at redhat dot com>, Eric Botcazou <ebotcazou at adacore dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 29 Feb 2012 08:55:57 +0100
- Subject: Re: [PATCH] Ignore hard register uses in DEBUG_INSNs for regs_ever_live (PR bootstrap/52397)
- Authentication-results: mr.google.com; spf=pass (google.com: domain of paolo.bonzini@gmail.com designates 10.68.233.5 as permitted sender) smtp.mail=paolo.bonzini@gmail.com; dkim=pass header.i=paolo.bonzini@gmail.com
- References: <20120228233742.GD18768@tyan-ft48-01.lab.bos.redhat.com>
Il 29/02/2012 00:37, Jakub Jelinek ha scritto:
> Hi!
>
> Bootstrap fails on ia64-linux with Ada currently, because we get
> a -fcompare-debug failure on one of the files, where a debug_insn
> is the only insn that references in5 hard register (which is live on
> entry of the first bb). hard_regs_live_count array is only used to compute
> regs_ever_live, so I don't see why it should take into account DEBUG_INSN
> uses. Bootstrapped/regtested on x86_64-linux and i686-linux, tested
> on uint.ad* from the PR using ia64-linux cross, ok for trunk?
>
> 2012-02-28 Jakub Jelinek <jakub@redhat.com>
>
> PR bootstrap/52397
> * df.h (struct df_d): Adjust comment that hard_regs_live_count
> doesn't count DEBUG_INSN refs.
> * df-scan.c (df_ref_create_structure): Don't set DF_HARD_REG_LIVE
> for DEBUG_INSN refs.
>
> --- gcc/df.h.jj 2011-12-14 14:04:30.000000000 +0100
> +++ gcc/df.h 2012-02-28 18:21:07.834599257 +0100
> @@ -574,7 +574,7 @@ struct df_d
> uses and defs as well as refs in eq notes are ignored. If the
> ref is a def, it cannot be a MAY_CLOBBER def. If the ref is a
> use, it cannot be the emim_reg_set or be the frame or arg pointer
> - register.
> + register. Uses in debug insns are ignored.
>
> IT IS NOT ACCEPTABLE TO MANUALLY CHANGE THIS ARRAY. This array
> always reflects the actual number of refs in the insn stream that
> --- gcc/df-scan.c.jj 2011-08-28 13:20:27.609420371 +0200
> +++ gcc/df-scan.c 2012-02-28 21:43:49.341591773 +0100
> @@ -2794,8 +2794,9 @@ df_ref_create_structure (enum df_ref_cla
> DF_REF_FLAGS_CLEAR (this_ref, DF_HARD_REG_LIVE);
>
> /* See if this ref needs to have DF_HARD_REG_LIVE bit set. */
> - if ((regno < FIRST_PSEUDO_REGISTER)
> - && (!DF_REF_IS_ARTIFICIAL (this_ref)))
> + if (regno < FIRST_PSEUDO_REGISTER
> + && !DF_REF_IS_ARTIFICIAL (this_ref)
> + && !DEBUG_INSN_P (DF_REF_INSN (this_ref)))
> {
> if (DF_REF_REG_DEF_P (this_ref))
> {
>
> Jakub
>
Ok.
For 4.8 I'm wondering whether we want a df_ref flag for "in a debug insn".
Paolo