public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Nathan Froyd <froydnj@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] allocate combine.c:LOG_LINKS in an obstack
Date: Tue, 05 Apr 2011 19:32:00 -0000	[thread overview]
Message-ID: <BANLkTi=jRdUeUYdryZqtGjz7ymVtbwb4kw@mail.gmail.com> (raw)
In-Reply-To: <20110405182820.GC27880@nightcrawler>

On Tue, Apr 5, 2011 at 11:28 AM, Nathan Froyd <froydnj@codesourcery.com> wrote:
> On Tue, Apr 05, 2011 at 11:22:56AM -0700, Nathan Froyd wrote:
>> On Tue, Apr 05, 2011 at 09:59:43AM -0400, Nathan Froyd wrote:
>> > On Mon, Apr 04, 2011 at 02:49:54PM -0400, Nathan Froyd wrote:
>> > > This patch does just what $SUBJECT suggests.
>> >
>> > v2, now with obstacks!
>>
>> This broke compilation on AUTO_INC_DEC targets.  Currently putting
>> together a fix and testing via cross to powerpc-eabispe.
>
> ...and here's the patch I'm going to install.
>
> -Nathan
>
>        * combine.c (combine_instructions) [AUTO_INC_DEC]: Declare links
>        as an rtx.
>        (try_combine) [AUTO_INC_DEC]: Declare a local link rtx.
>
> diff --git a/gcc/combine.c b/gcc/combine.c
> index 30b7fdd..3e4a38c 100644
> --- a/gcc/combine.c
> +++ b/gcc/combine.c
> @@ -1139,6 +1139,8 @@ combine_instructions (rtx f, unsigned int nregs)
>       FOR_BB_INSNS (this_basic_block, insn)
>         if (INSN_P (insn) && BLOCK_FOR_INSN (insn))
>          {
> +            rtx links;
^^^^^^^^^^^^^^^^^^^^^^

links may be unused if  AUTO_INC_DEC is not defined.


> +
>             subst_low_luid = DF_INSN_LUID (insn);
>             subst_insn = insn;
>
> @@ -2911,15 +2913,18 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p)
>     /* It's not the exception.  */
>  #endif
>  #ifdef AUTO_INC_DEC
> -    for (link = REG_NOTES (i3); link; link = XEXP (link, 1))
> -      if (REG_NOTE_KIND (link) == REG_INC
> -         && (reg_overlap_mentioned_p (XEXP (link, 0), PATTERN (i2))
> -             || (i1 != 0
> -                 && reg_overlap_mentioned_p (XEXP (link, 0), PATTERN (i1)))))
> -       {
> -         undo_all ();
> -         return 0;
> -       }
> +    {
> +      rtx link;
> +      for (link = REG_NOTES (i3); link; link = XEXP (link, 1))
> +       if (REG_NOTE_KIND (link) == REG_INC
> +           && (reg_overlap_mentioned_p (XEXP (link, 0), PATTERN (i2))
> +               || (i1 != 0
> +                   && reg_overlap_mentioned_p (XEXP (link, 0), PATTERN (i1)))))
> +         {
> +           undo_all ();
> +           return 0;
> +         }
> +    }
>  #endif
>
>   /* See if the SETs in I1 or I2 need to be kept around in the merged
>



-- 
H.J.

      parent reply	other threads:[~2011-04-05 19:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-04 18:50 [PATCH] allocate combine.c:LOG_LINKS in an alloc_pool Nathan Froyd
2011-04-04 19:01 ` Steven Bosscher
2011-04-04 19:25   ` Nathan Froyd
2011-04-05 10:14     ` Richard Guenther
2011-04-05 14:00 ` [PATCH] allocate combine.c:LOG_LINKS in an obstack Nathan Froyd
2011-04-05 14:12   ` Richard Guenther
2011-04-05 14:43   ` Steven Bosscher
2011-04-05 14:51     ` Nathan Froyd
2011-04-05 15:07       ` Steven Bosscher
2011-04-05 16:13       ` Jeff Law
2011-04-05 18:23   ` Nathan Froyd
2011-04-05 18:28     ` Nathan Froyd
2011-04-05 19:29       ` H.J. Lu
2011-04-05 19:34         ` Nathan Froyd
2011-04-05 19:32       ` H.J. Lu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTi=jRdUeUYdryZqtGjz7ymVtbwb4kw@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=froydnj@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).