This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: [lno-branch] loop-invariant.c problem
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Dale Johannesen <dalej at apple dot com>
- Cc: "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 24 May 2004 23:40:09 +0200
- Subject: Re: Patch: [lno-branch] loop-invariant.c problem
- References: <55C79BCC-ADCA-11D8-96B7-000A95D7CD40@apple.com>
Hello,
> Which is wrong, and causes invalid code to be produced when the outer
> loop is completely peeled: the REG_EQUAL from one iteration matches
> with the set of 1597 from the previous iteration. The fix is simply to
> record
> REG_EQUAL notes as uses:
>
> Index: loop-invariant.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/Attic/loop-invariant.c,v
> retrieving revision 1.1.4.9
> diff -u -d -b -w -r1.1.4.9 loop-invariant.c
> --- loop-invariant.c 10 May 2004 17:55:56 -0000 1.1.4.9
> +++ loop-invariant.c 24 May 2004 21:24:38 -0000
> @@ -303,7 +303,7 @@
> for (i = 0; i < loop->num_nodes; i++)
> bitmap_set_bit (blocks, body[i]->index);
>
> - df_analyze_subcfg (df, blocks, DF_UD_CHAIN | DF_HARD_REGS);
> + df_analyze_subcfg (df, blocks, DF_UD_CHAIN | DF_HARD_REGS |
> DF_EQUIV_NOTES);
> BITMAP_XFREE (blocks);
> }
>
> I believe this is obvious. Any problem?
I believe this is OK. Thanks for investigation.
Zdenek