public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: rguenther@suse.de (Richard Guenther)
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Remove basic_block->loop_depth
Date: Tue, 14 Aug 2012 10:16:00 -0000	[thread overview]
Message-ID: <201208141016.q7EAGHMF012074@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1208131458110.28649@zhemvz.fhfr.qr> from "Richard Guenther" at Aug 13, 2012 02:59:37 PM

Richard Guenther wrote:

> Accessing loop_depth (bb->loop_father) isn't very expensive.  The
> following removes the duplicate info in basic-blocks which is not
> properly kept up-to-date at the moment.

Looks like this broke SPU build, since spu_machine_dependent_reorg
accesses ->loop_depth.  According to comments in the code, this
was done because of concerns that loop_father may no longer be set up
this late in compilation, so I'm wondering whether just replacing
this by loop_depth (bb->loop_father) would work here ...

          /* If this branch is a loop exit then propagate to previous
             fallthru block. This catches the cases when it is a simple
             loop or when there is an initial branch into the loop. */
          if (prev && (loop_exit || simple_loop)
              && prev->loop_depth <= bb->loop_depth)
            prop = prev;

          /* If there is only one adjacent predecessor.  Don't propagate
             outside this loop.  This loop_depth test isn't perfect, but
             I'm not sure the loop_father member is valid at this point.  */
          else if (prev && single_pred_p (bb)
                   && prev->loop_depth == bb->loop_depth)
            prop = prev;

Any suggestions?

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com

  reply	other threads:[~2012-08-14 10:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-13 13:02 Richard Guenther
2012-08-14 10:16 ` Ulrich Weigand [this message]
2012-08-14 10:51   ` Richard Guenther
2012-08-14 11:00     ` Steven Bosscher
2012-08-14 11:01       ` Richard Guenther
2012-08-15 12:04     ` [rfc] Fix SPU build (Re: [PATCH] Remove basic_block->loop_depth) Ulrich Weigand
2012-08-15 12:07       ` Richard Guenther
2012-08-15 22:18         ` Ulrich Weigand

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=201208141016.q7EAGHMF012074@d06av02.portsmouth.uk.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /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).