From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20624 invoked by alias); 18 Oct 2004 22:06: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 20597 invoked from network); 18 Oct 2004 22:06:18 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 18 Oct 2004 22:06:18 -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 i9IM6I8P030312; Mon, 18 Oct 2004 18:06:18 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9IM6Hr31160; Mon, 18 Oct 2004 18:06:17 -0400 Received: from pain (vpn50-85.rdu.redhat.com [172.16.50.85]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id i9IM6DVn023927; Mon, 18 Oct 2004 18:06:15 -0400 Subject: Re: Fix a tcb crash and a potential bug on mainline From: Andrew MacLeod To: Steven Bosscher Cc: gcc-patches , Diego Novillo In-Reply-To: <200410182303.52997.stevenb@suse.de> References: <200410182303.52997.stevenb@suse.de> Content-Type: text/plain Message-Id: <1098137172.5695.573.camel@pain> Mime-Version: 1.0 Date: Mon, 18 Oct 2004 22:06:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg01560.txt.bz2 On Mon, 2004-10-18 at 17:03, Steven Bosscher wrote: > Hi, > I think the root cause of this bug is that c_13 is put on the free list, > and I think its SSA_NAME_DEF_STMT should be set to the empty statement, > because remove_phi_arg_num() cannot know if there are any immediate > uses of it still left. I don't know if making that change could have > some unforseen effects, so I decided to re-hide the the bug by just not > looking at unreachable blocks in cleanup_control_flow(). I've tried to > convince myself that this can not happen in other situations, but I'm > not sure. This may be something Andrew may want to look into as part > of his immediate uses work?? well, someone can look into it, perhaps me onm my branch :-). It will certainly be trivial to tell if there are any uses of c_13, and simply change all of them to the value in the arguement for the phi, or turn the PHI into a copy. the other thing you could do is simply emit the PHI as a copy at the start of the block instead of deleting it, and DCE will remove it if there arent any uses. I actually thought this is what we did when we had a PHI left with only one incoming edge. We use to do that didnt we? Its defiend as a copy, so how can anyone delete it without knowing about its uses? either that, or I read this note too quickly :-) Andrew