public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeffrey A Law <law@redhat.com>
To: Andrew Pinski <pinskia@physics.uc.edu>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix PRs middle-end/15014 and middle-end/16973, removing labels with their address taken
Date: Mon, 18 Oct 2004 19:27:00 -0000	[thread overview]
Message-ID: <1098127576.2915.29.camel@localhost.localdomain> (raw)
In-Reply-To: <1CCD860A-1AE5-11D9-B778-000A95D692F4@physics.uc.edu>

On Sun, 2004-10-10 at 11:52, Andrew Pinski wrote:
> On Oct 5, 2004, at 6:35 PM, Jeffrey A Law wrote:
> >> ChangeLog:
> >> 	* tre-cfg.c (make_edges): After making the edges but before
> >> 	cleaning up the cfg, make an edge from the first BB to ever
> >> 	BB which we take the address of the label.
> >
> > If we're going to allow this, then I would strongly recommend
> > against this approach to the problem.  Instead just move
> > these labels to the start of their nearest following block that
> > is reachable.
> 
> Actually this was easier than I thought.
> And here is the patch which fixes this problem, the way you recommended.
> I had forgot that remove_bb was actually doing the removal of 
> basic_block.
> 
> OK? Bootstrapped and tested on PPC-darwin.
> 
> Thanks,
> Andrew Pinski
> 
> ChangeLog:
> 
> 	* tree-cfg.c (remove_bb): If we have a label expression in the
> 	basic block and the label we have taken the address, move the
> 	label expression to the basic block which is previous in the
> 	linked list.
> 	(tree_verify_flow_info): Fix printing out the label name of the
> 	problematic label expression.
It appears that you move the label to the start of the previous
block, which is probably OK.  I would have moved the label to
the start of the next block which would probably have been less
disruptive in terms of the location of the label.  However, given
the label is not reachable in the flow sense that's probably OK.

Approved.

jeff

  reply	other threads:[~2004-10-18 19:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-04 15:06 Andrew Pinski
2004-10-05 22:40 ` Jeffrey A Law
2004-10-05 23:12   ` Joseph S. Myers
2004-10-06  2:35   ` Andrew Pinski
2004-10-06 17:03     ` Jeffrey A Law
2004-10-10 18:01   ` Andrew Pinski
2004-10-18 19:27     ` Jeffrey A Law [this message]
2004-10-18 20:19       ` Andrew Pinski
2004-10-18 21:37 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=1098127576.2915.29.camel@localhost.localdomain \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=pinskia@physics.uc.edu \
    /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).