From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5383 invoked by alias); 20 Jan 2004 18:15:08 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 5338 invoked from network); 20 Jan 2004 18:15:05 -0000 Received: from unknown (HELO frothingslosh.sfbay.redhat.com) (66.187.237.200) by sources.redhat.com with SMTP; 20 Jan 2004 18:15:05 -0000 Received: from frothingslosh.sfbay.redhat.com (localhost.localdomain [127.0.0.1]) by frothingslosh.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id i0KIF4QA007973; Tue, 20 Jan 2004 10:15:04 -0800 Received: (from rth@localhost) by frothingslosh.sfbay.redhat.com (8.12.8/8.12.8/Submit) id i0KIF3dB007971; Tue, 20 Jan 2004 10:15:03 -0800 X-Authentication-Warning: frothingslosh.sfbay.redhat.com: rth set sender to rth@redhat.com using -f Date: Tue, 20 Jan 2004 18:15:00 -0000 From: Richard Henderson To: Andrew Pinski Cc: Jan Hubicka , Jason Merrill , law@redhat.com, gcc@gcc.gnu.org, Jan Hubicka Subject: Re: tree-SSA and indirect references. Message-ID: <20040120181503.GF7564@redhat.com> Mail-Followup-To: Richard Henderson , Andrew Pinski , Jan Hubicka , Jason Merrill , law@redhat.com, gcc@gcc.gnu.org, Jan Hubicka References: <20040120003156.GE8495@atrey.karlin.mff.cuni.cz> <20040120005924.GA3079@redhat.com> <20040120095013.GC7878@kam.mff.cuni.cz> <20040120102113.GA5204@redhat.com> <20040120142517.GL7878@kam.mff.cuni.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-SW-Source: 2004-01/txt/msg01530.txt.bz2 On Tue, Jan 20, 2004 at 08:57:24AM -0800, Andrew Pinski wrote: > There is also PR 8781 which has the same exact problem and it is > shorter. This is a different problem. There are no casts involved. After SRA and DCE, we have pred = f; pred.pred = &pred; pred.pred = &pred; pred.pred = &pred; pred.pred = &pred; pred.pred = &pred; pred.pred = &pred; pred.pred = &pred; pred.pred = &pred; T.1_54 = pred.pred; T.2_55 = *T.1_54; T.3_56 = T.2_55 (); We don't get f propagated to T.2_55 because (1) SRA doesn't work on structures whose address is taken, and (2) we don't have even *simplistic* propagation of field values for addressed structs. Point the second is criminal. The reason we don't delete pred.pred = &pred; pred.pred = &pred; pred.pred = &pred; pred.pred = &pred; pred.pred = &pred; pred.pred = &pred; pred.pred = &pred; is that we think that these objects have all have their address taken, and thus might be referenced by the function call. There was one more iteration on the end that DCE removed, so in theory repeated applications of DCE would clean this up. However, I think the most dramatic improvement would be escape analysis. None of the addresses in the chain is stored in globally accessible memory, and thus the function call can't reference any of the addresses, and thus they are all dead. r~