This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix PR34916, 35519 Combine (Dataflow merge regression.)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]