From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1808 invoked by alias); 4 Nov 2013 18:22:18 -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 1792 invoked by uid 89); 4 Nov 2013 18:22:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Nov 2013 18:21:45 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rA4ILbUo032225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 4 Nov 2013 13:21:37 -0500 Received: from stumpy.slc.redhat.com (ovpn-113-132.phx2.redhat.com [10.3.113.132]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rA4ILaRU011406; Mon, 4 Nov 2013 13:21:37 -0500 Message-ID: <5277E5B0.3040306@redhat.com> Date: Mon, 04 Nov 2013 18:23:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Jakub Jelinek , Andrew MacLeod CC: David Malcolm , gcc-patches@gcc.gnu.org Subject: Re: [PATCH 0/6] Conversion of gimple types to C++ inheritance (v3) References: <5271CBF9.2070005@redhat.com> <1383236801-13234-1-git-send-email-dmalcolm@redhat.com> <52741EE2.3030100@redhat.com> <20131101214148.GF27813@tucnak.zalov.cz> In-Reply-To: <20131101214148.GF27813@tucnak.zalov.cz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00261.txt.bz2 On 11/01/13 15:41, Jakub Jelinek wrote: > On Fri, Nov 01, 2013 at 05:36:34PM -0400, Andrew MacLeod wrote: >> static inline void >> ! gimple_call_set_lhs (gimple gs, tree lhs) >> { >> - GIMPLE_CHECK (gs, GIMPLE_CALL); >> gimple_set_op (gs, 0, lhs); >> to >> static inline void >> ! gimple_call_set_lhs (gimple_statement_call *gs, tree lhs) >> { >> gimple_set_op (gs, 0, lhs); >> >> >> but then every location that calls it needs an appropriate change: >> >> ! gimple call; >> ! call = gimple_build_call_vec (build_fold_addr_expr_loc (0, >> alias), vargs); >> gimple_call_set_lhs (call, atree); >> >> --- 1518,1524 ---- >> >> ! gimple_statement_call *call; >> ! call = as_a (gimple_build_call_vec >> (build_fold_addr_expr_loc (0, alias), vargs)); >> gimple_call_set_lhs (call, atree); >> >> And in fact there is a ripple effect to then change >> gimple_build_call_vec to simply return a gimple_statement_call *... >> Then this doesn't look as ugly either... >> >> ! gimple_statement_call *call; >> ! call = gimple_build_call_vec (build_fold_addr_expr_loc (0, >> alias), vargs); >> gimple_call_set_lhs (call, atree); >> >> that is looking much better :-) > > Do you seriously think this is an improvement? The cost of changing > the --enable-checking=yes cost to compile time checking in either > cases sounds way too high to me. Please don't. ?!? One of the things we're reallying trying to do here is be type safe and use the type system to check for things at compile-time rather than runtime checks. jeff