From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26118 invoked by alias); 16 Nov 2012 12:44:05 -0000 Received: (qmail 26106 invoked by uid 22791); 16 Nov 2012 12:44:04 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Nov 2012 12:43:59 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 17AEBA2111; Fri, 16 Nov 2012 13:43:58 +0100 (CET) Date: Fri, 16 Nov 2012 12:44:00 -0000 From: Michael Matz To: Lawrence Crowl Cc: "gcc@gcc.gnu.org" Subject: Re: Simplifying Gimple Generation In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg00247.txt.bz2 Hi, On Thu, 15 Nov 2012, Lawrence Crowl wrote: > They allow us to use the same name for the same actions in two > different contexts. In particular, distinguishing between statement > construction in SSA and non-SSA. I don't see the difference, and I don't see where you need context data to distinguis that, in case you really need to. > > That is, I'm not yet convinced that you really need any local > > data for which you'd have to add helper classes. > > We also need to ask if we will ever need local data. If we plan > for it now, future changes might be possible without affecting > existing code. Otherwise, we might require more substantial patches. But so it _now_ requires substantial patches without it being clear that we ever need the complications. Please don't optimize prematurely. > > statements without introduction of any helper class. Basically, > > whenever a helper class merely contains one member of a different > > type, then I think that other type should be improved so that the > > wrapper class isn't necessary anymore. Fewer types -> good :) > > While I would agree that unnecessary types are bad, I have found that > having types to represent distinct concepts is a good way to structure > my thinking and catch my errors. But where exactly are your concepts different? We have gimple_seq, we can append to it. You had ssa_seq, you could append to it (nicer). We can construct new statements already (boilerplaty), you can construct new statements (nicer). It just the same with a leaner interface. Ciao, Michael.