From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26294 invoked by alias); 22 Oct 2004 16:38:42 -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 26277 invoked from network); 22 Oct 2004 16:38:40 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 22 Oct 2004 16:38:40 -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.11) with ESMTP id i9MGcVmh009698; Fri, 22 Oct 2004 12:38:37 -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 i9MGcVr15903; Fri, 22 Oct 2004 12:38:31 -0400 Received: from pain (vpn50-70.rdu.redhat.com [172.16.50.70]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id i9MGcQvn015579; Fri, 22 Oct 2004 12:38:28 -0400 Subject: Re: [ssaupdate] Local dominance info From: Andrew MacLeod To: Michael Matz Cc: Zdenek Dvorak , gcc-patches In-Reply-To: References: <20041019215129.GA29721@atrey.karlin.mff.cuni.cz> <1098279112.5695.3918.camel@pain> <20041020192719.GA20919@atrey.karlin.mff.cuni.cz> <1098310966.20227.24.camel@pain> Content-Type: text/plain Message-Id: <1098463105.20227.52.camel@pain> Mime-Version: 1.0 Date: Fri, 22 Oct 2004 17:05:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg01911.txt.bz2 On Fri, 2004-10-22 at 12:18, Michael Matz wrote: > Hi, > > On Wed, 20 Oct 2004, Andrew MacLeod wrote: > > > > > This strikes me *much* more as a local thing that an individual pass > > > > might be interested in, and so should number the stmt's itself for the > > > > duration of its interest. > > > > > > Still you would need some mechanism to update things when statements are > > > inserted, so this would make things only more complicated. > > > > and what wrong with the local_dom_insert_after() and > > local_dom_insert_before() which call the bsi routines? It looks pretty > > trivial to do that, then the info only exists and is maintained when > > you want it. > > But then you have to ask yourself everytime you add stmts if you want to > use these or the normal inserters. And what about common code which > inserts statements? Do we need two versions of them too? > > Generally I think there should be exactly one interface to do something > (inserting stmts), so if maintaining this local numbering doesn't cost > much it would be much cleaner to do this, instead of relying on special > case code. > > Why exactly would you like to have this keeping of information be factored > out? > the claim is that it is cheap. I claim it will have a cost, perhaps it is small most of the time, but there is bound to be pathological cases which do have an impact. > > I don't see any reason why it should be kept up to date all the time > > when virtually no-one else cares about it. > > Cleanlyness of interfaces? Less potential for funny bugs because the > wrong inserters were used by some common code? It depends. I've seen no reason for it. If it turns out that having it present *will* make a different in updating ssa on the fly, thats different. I've seen no argument why 70 other optimizations should keep the information up to date when they dont care about it. The general renamer has to go through all the basic blocks *anyway* in order to calculate live-on-entry, so it seems pretty easy to do that local numbering on the fly since you are making a pass the the IL anyway. If there is a more iterative into-ssa solution that can make use of this info and doesnt have to make a pass through the IL, then thats an arguement for it. If there is a reason to keep it up to date other than that, perhaps that is an argument too. So far all Ive seen/heard is keeping the information up to date doesnt cost a lot, but I see few passes have a use for it. Tell me how useful it is, and why its better than calculating it on the fly when you need it and maybe I am convinced. Andrew