This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix PR34916, 35519 Combine (Dataflow merge regression.)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andy H <hutchinsonandy at aim dot com>
- Cc: gcc-patches at gcc dot gnu dot org, steven at gcc dot gnu dot org
- Date: Wed, 19 Mar 2008 06:09:19 -0400
- Subject: Re: Fix PR34916, 35519 Combine (Dataflow merge regression.)
- References: <47E035AB.5010904@aim.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Mar 18, 2008 at 05:35:39PM -0400, Andy H wrote:
> 2008-03-16 Andy Hutchinson <hutchinsonandy@aim.com>
>
> PR rtl-optimization/34916
> PR middle-end/35519
> * combine.c (create_log_links): Do not create duplicate LOG_LINKS
> between instruction pairs.
>
> Index: combine.c
> ===================================================================
> --- combine.c (revision 133282)
> +++ combine.c (working copy)
> @@ -976,8 +976,17 @@
> assignments later. */
> if (regno >= FIRST_PSEUDO_REGISTER
> || asm_noperands (PATTERN (use_insn)) < 0)
> - LOG_LINKS (use_insn) =
> - alloc_INSN_LIST (insn, LOG_LINKS (use_insn));
> + {
> + /* Don't add duplicates links between instructions. */
> + rtx links;
> + for (links = LOG_LINKS (use_insn); links; links = XEXP (links, 1))
> + if (insn == XEXP (links, 0))
> + break;
> +
> + if (!links)
> + LOG_LINKS (use_insn) =
> + alloc_INSN_LIST (insn, LOG_LINKS (use_insn));
> + }
Please fix formatting, the indentation is supposed to be only 2 spaces rather
than 4 as you've done, also a tab should be used instead of each 8 spaces.
Jakub