From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29118 invoked by alias); 18 Oct 2004 19:26:24 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 29110 invoked from network); 18 Oct 2004 19:26:23 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 18 Oct 2004 19:26:23 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i9IJQNGO018112; Mon, 18 Oct 2004 15:26:23 -0400 Received: from [172.16.83.144] (vpn83-144.boston.redhat.com [172.16.83.144]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9IJQHr10000; Mon, 18 Oct 2004 15:26:18 -0400 Subject: Re: [PATCH] Fix PRs middle-end/15014 and middle-end/16973, removing labels with their address taken From: Jeffrey A Law Reply-To: law@redhat.com To: Andrew Pinski Cc: GCC Patches In-Reply-To: <1CCD860A-1AE5-11D9-B778-000A95D692F4@physics.uc.edu> References: <2852718A-1614-11D9-81C0-000A95D692F4@physics.uc.edu> <1097015702.22266.583.camel@localhost.localdomain> <1CCD860A-1AE5-11D9-B778-000A95D692F4@physics.uc.edu> Content-Type: text/plain Organization: Red Hat, Inc Message-Id: <1098127576.2915.29.camel@localhost.localdomain> Mime-Version: 1.0 Date: Mon, 18 Oct 2004 19:27:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg01526.txt.bz2 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