From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6654 invoked by alias); 5 Nov 2013 23:23:40 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 6643 invoked by uid 89); 5 Nov 2013 23:23:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_40,RDNS_NONE,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-oa0-f46.google.com Received: from Unknown (HELO mail-oa0-f46.google.com) (209.85.219.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 05 Nov 2013 23:23:39 +0000 Received: by mail-oa0-f46.google.com with SMTP id g12so9430624oah.19 for ; Tue, 05 Nov 2013 15:23:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=SH/anTLIdPkYeqNwGVfSzeJQApUWQgs3RJVdeIAKZX0=; b=TifiomK8ExneOjdIVWwkjeAWy+iuI/cOFaI3WitoXDwaNZt0r4GJeoT3JOM9NpSZwd 5z6djmJK5pwJES6vXgBMiRkNlHnG5AQPex3qoDgqMdFLVDUowtAW6PyUxgHSOBkcSNUB xlr1bTHd+bia2T09Shv3NcqTdUM61HEvpCyob+L9eueq9uuw5NSZbYyLycTZyMpJwVrj P3cKcPb00aeBPNJAEmLdEbHEI3UIDxyKJIshsfhHcDtL//GDfuxjeJo1f4u+7qtpSFPr z7jXdyi66VOfTJ5Dfc6Cz87tTbAmJUCXN9Y2tcQLG3YQzl2yj66GuZkwJUol49CFhmQl wo0g== X-Gm-Message-State: ALoCoQmLOJvGuMsX//kEeQY+PQ3JZdSDHt5yd21e4whZTfeQKCPgN1G5m4gmZ/0CPHClhBypA3pacO1rGflTyAiB12i6SAjU/4NL2pzcWA0gWC7AudYGKiHYAUL1GTfrYYrXhxgP9HGSswWt6rPIdDCswIS/aVJA2w4pumTgpfBeLnL0ubhRRWAwyuV+JFFdOrOAOf83POx9TayXl5SrSF177GpwigVyeA== MIME-Version: 1.0 X-Received: by 10.60.137.193 with SMTP id qk1mr3831oeb.89.1383693810530; Tue, 05 Nov 2013 15:23:30 -0800 (PST) Received: by 10.60.145.144 with HTTP; Tue, 5 Nov 2013 15:23:30 -0800 (PST) In-Reply-To: <52796D38.2010602@redhat.com> References: <5271CBF9.2070005@redhat.com> <1383236801-13234-1-git-send-email-dmalcolm@redhat.com> <527960A8.7030107@redhat.com> <1383688624.5282.111.camel@surprise> <52796D38.2010602@redhat.com> Date: Wed, 06 Nov 2013 01:14:00 -0000 Message-ID: Subject: Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3) From: Ian Lance Taylor To: Jeff Law Cc: David Malcolm , gcc-patches , Andrew MacLeod Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00496.txt.bz2 On Tue, Nov 5, 2013 at 2:12 PM, Jeff Law wrote: > > I can't speak for Andrew, but my experience with this kind of object type > casting in a large C++ project is that it's a red flag for a design problem. I'm going to chime in to say that I think it's a pretty typical way to represent a compiler IR in C++. There is a base type that a lot of code uses, but there is also a real type, and the way to get to that real type is to use a cast. We could do it all with virtual functions, but those carry a different cost. In effect, using virtual functions increases the size of the code field from 16 bits to 64 bits. It adds up. Also this seems to be a pretty direct version of the data structures we already have. Ian