This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix df-core to not look for df info on notes
- From: Kenneth Zadeck <zadeck at naturalbridge dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Ian Lance Taylor <ian at airs dot com>, Daniel Berlin <dberlin at dberlin dot org>, Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- Date: Sat, 13 May 2006 15:31:24 -0400
- Subject: Re: Fix df-core to not look for df info on notes
- References: <200605132133.49569.steven@gcc.gnu.org>
this looks fine for the dataflow branch.
kenny
Steven Bosscher wrote:
> Hi,
>
> This is the bit of the fwprop patch which had to be posted separately.
> It changes df-core.c to not look for DF_INSN_UID_GET on notes. Dan
> already said this should work. Kenny, iiuc this should be applied
> on the dataflow branch as well.
>
> Bootstrapped all except Ada on x86_64-suse-linux-gnu with and without
> the fwprop patch. Without fwprop there are no new regressions.
>
> OK for mainline? And for the dataflow branch?
>
> (With the fwprop patch I get two extra failures which are caused by
> bugs in fwprop that were hidden with the previous df-core.c diff, see
> http://gcc.gnu.org/ml/gcc-testresults/2006-05/msg00727.html. It seems
> that fwprop introduces a new JUMP_INSN that sets nothing but (pc), and
> somehow that insn isn't getting DF info attached to it. Working on it,
> but it's irrelevant for this df-core.c patch...)
>
> Gr.
> Steven
>
> * df-core.c (df_bb_regno_last_use_find): Do not look for dataflow
> information attached to non-INSNs such as NOTEs.
> (df_bb_regno_first_def_find, df_bb_regno_last_def_find): Likewise.
>
> Index: df-core.c
> ===================================================================
> --- df-core.c (revision 113736)
> +++ df-core.c (working copy)
> @@ -915,10 +915,14 @@ df_bb_regno_last_use_find (struct df *df
> {
> rtx insn;
> struct df_ref *use;
> + unsigned int uid;
>
> FOR_BB_INSNS_REVERSE (bb, insn)
> {
> - unsigned int uid = INSN_UID (insn);
> + if (!INSN_P (insn))
> + continue;
> +
> + uid = INSN_UID (insn);
> for (use = DF_INSN_UID_GET (df, uid)->uses; use; use = use->next_ref)
> if (DF_REF_REGNO (use) == regno)
> return use;
> @@ -934,10 +938,14 @@ df_bb_regno_first_def_find (struct df *d
> {
> rtx insn;
> struct df_ref *def;
> + unsigned int uid;
>
> FOR_BB_INSNS (bb, insn)
> {
> - unsigned int uid = INSN_UID (insn);
> + if (!INSN_P (insn))
> + continue;
> +
> + uid = INSN_UID (insn);
> for (def = DF_INSN_UID_GET (df, uid)->defs; def; def = def->next_ref)
> if (DF_REF_REGNO (def) == regno)
> return def;
> @@ -953,11 +961,14 @@ df_bb_regno_last_def_find (struct df *df
> {
> rtx insn;
> struct df_ref *def;
> + unsigned int uid;
>
> FOR_BB_INSNS_REVERSE (bb, insn)
> {
> - unsigned int uid = INSN_UID (insn);
> + if (!INSN_P (insn))
> + continue;
>
> + uid = INSN_UID (insn);
> for (def = DF_INSN_UID_GET (df, uid)->defs; def; def = def->next_ref)
> if (DF_REF_REGNO (def) == regno)
> return def;
>