From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45001 invoked by alias); 16 Nov 2015 23:16:29 -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 44978 invoked by uid 89); 16 Nov 2015 23:16:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: resqmta-po-08v.sys.comcast.net Received: from resqmta-po-08v.sys.comcast.net (HELO resqmta-po-08v.sys.comcast.net) (96.114.154.167) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 16 Nov 2015 23:16:27 +0000 Received: from resomta-po-20v.sys.comcast.net ([96.114.154.244]) by resqmta-po-08v.sys.comcast.net with comcast id iPGN1r00C5Geu2801PGQXa; Mon, 16 Nov 2015 23:16:24 +0000 Received: from [IPv6:2001:558:6045:a4:40c6:7199:cd03:b02d] ([IPv6:2001:558:6045:a4:40c6:7199:cd03:b02d]) by resomta-po-20v.sys.comcast.net with comcast id iPGN1r0062ztT3H01PGP2Y; Mon, 16 Nov 2015 23:16:24 +0000 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Add null identifiers to genmatch From: Mike Stump In-Reply-To: <87ziydy5lk.fsf@googlemail.com> Date: Mon, 16 Nov 2015 23:16:00 -0000 Cc: Jeff Law , Pedro Alves , GCC Patches , richard.sandiford@arm.com Content-Transfer-Encoding: quoted-printable Message-Id: References: <87lhaaosh5.fsf@e105548-lin.cambridge.arm.com> <563E0B2D.3080408@redhat.com> <563FD7F8.1020503@redhat.com> <564A3957.60102@redhat.com> <564A4122.9010100@redhat.com> <87ziydy5lk.fsf@googlemail.com> To: Richard Sandiford X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg02012.txt.bz2 On Nov 16, 2015, at 1:52 PM, Richard Sandiford wrot= e: >=20 > Yeah. Kenny was adamant that for wide-int we should have an UNSIGNED/SIG= NED Yeah, you can blame me. I think (, UNSIGNED) conveys more than (,true) or = (,false). The sad part is, this has always been true. > enum rather than a boolean flag. And I think that does make things clear= er. > I always have to remind myself whether "true" means "unsigned" or "signed= ", > especially for RTL functions. Certainly any api that uses boolean for signed/unsigned, can be switched to= signop (aka SIGNED, UNSIGNED). It was put in as a general feature disconn= ected from wide-int for a reason. :-) Here we shall salute the last of the hold outs: base_type_for_mode (machine_mode mode, bool unsignedp) convert_extracted_bit_field (rtx x, machine_mode mode, machine_mode tmode, = bool unsignedp) gimple_signed_or_unsigned_type (bool unsignedp, tree type) avoid_expensive_constant (machine_mode mode, optab binoptab, int opn, rtx x, bool unsignedp) get_rtx_code (enum tree_code tcode, bool unsignedp) vector_compare_rtx (enum tree_code tcode, tree t_op0, tree t_op1, bool unsignedp, enum insn_code icode) create_expand_operand (struct expand_operand *op, enum expand_operand_type type, rtx value, machine_mode mode, bool unsigned_p) create_convert_operand_to (struct expand_operand *op, rtx value, machine_mode mode, bool unsigned_p) create_convert_operand_from (struct expand_operand *op, rtx value, machine_mode mode, bool unsigned_p) but, it was designed with uses like: bool unsigned_p =3D false; =20 in mind as well. I will note: bool signed_p; and: shorten_into_mode (struct rtx_iv *iv, machine_mode mode, enum rtx_code cond, bool signed_p, struct niter_desc *de= sc) are the odd man out. Their value is inverted from the value signop uses. > I certainly prefer the enum to separate functions though. They can get > messy if a new call site is added that needs a variable parameter. To me it=92s a numbers game. When there are 200 simple calls and 5 complex= ones, I prefer 200 simple calls without the extra parameters, and 5 with t= he horror that is the argument list.