From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98245 invoked by alias); 5 Dec 2015 23:48:48 -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 98235 invoked by uid 89); 5 Dec 2015 23:48:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-qg0-f99.google.com Received: from mail-qg0-f99.google.com (HELO mail-qg0-f99.google.com) (209.85.192.99) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 05 Dec 2015 23:48:47 +0000 Received: by qgea14 with SMTP id a14so9390264qge.2 for ; Sat, 05 Dec 2015 15:48:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=p8c8jdsEsCRY7C4KshWbAGOGRIFPk38LsEzlC9sSQQ4=; b=kJSCYQ9y8ZWfv7DNLikfRLLtcR2EdEKR7V3XMSiX4SVchKOZjKU3BE+vcWaZHxFjQt qSSapiamck2qF7/LIIyWrmDcXamAl2NnXMVW3aTdStexepGyZQUUgPSgTtscxsGj9Nk9 ap2S/3Paqe64oVcOC2Vfsm1cNMVskPEUBWNIkwv86PElTf2jD8pYHvDZwOIpowtWvRmA tAoLJpwxerUWW9V8OtB+0ldh17gm5kuSJ1/EriANvOhymK4i1m8CATfDQrj1pKZg8s1m DrZ9hPFRCYZq09msh/2Oy4eKtU7Ut0QZwUwWWxyr/Jc1L/kyvx7jpmkJ5Lu7x9oEjU+e giMw== X-Gm-Message-State: ALoCoQnfVdDOqQChfTEYByvo3S6zwuRJ9qXl6xYSiGmoOzV5GQpfS1bWvPSMgLuGAfgKk3W+BsLAo/d6WUfFU6U3vJiUmZv/KA== X-Received: by 10.50.160.5 with SMTP id xg5mr11104566igb.46.1449359325076; Sat, 05 Dec 2015 15:48:45 -0800 (PST) Received: from intrepid.com (74-95-8-117-SFBA.hfc.comcastbusiness.net. [74.95.8.117]) by smtp-relay.gmail.com with ESMTPS id yt10sm1097263igb.0.2015.12.05.15.48.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Dec 2015 15:48:45 -0800 (PST) X-Relaying-Domain: intrepid.com Received: from corp.local (localhost [127.0.0.1]) by corp.local (8.14.8/8.14.8) with ESMTP id tB5NmiN6002120; Sat, 5 Dec 2015 15:48:44 -0800 Received: (from gary@localhost) by corp.local (8.14.8/8.14.8/Submit) id tB5NmhNf002119; Sat, 5 Dec 2015 15:48:43 -0800 Date: Sat, 05 Dec 2015 23:48:00 -0000 From: Gary Funck To: Richard Biener Cc: Gcc Patches , Andrew MacLeod , Ian Lance Taylor , Jeff Law , Marek Polacek , Richard Henderson , Roger Sayle , Nenad Vukicevic Subject: Re: [UPC 07/22] lowering, pointer-to-shared ops Message-ID: <20151205234843.GU2094@intrepid.com> References: <20151201060236.GA31118@intrepid.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg00665.txt.bz2 On 12/01/15 12:42:48, Richard Biener wrote: > On Mon, 30 Nov 2015, Gary Funck wrote: > [...] > > + if (bitpos) > > + { > > + t_offset = size_int (bitpos / BITS_PER_UNIT); > > + if (offset) > > + t_offset = fold (build_binary_op (loc, PLUS_EXPR, > > + offset, t_offset, 0)); > > Don't use fold (). If you want a simplified tree don't go > through build_binary_op but use fold_build2. In this case > it looks you want to use size_binop anyway. OK Regarding size_binop(), I'll need to review the code. There are places that we need to retain sign and use signed size types for example. > > + } > > + else > > + t_offset = offset; > > + { > > + const tree base_addr_type = TREE_TYPE (base_addr); > > + const enum tree_code cvt_op = > > + lang_hooks.types_compatible_p (upc_char_pts_type_node, base_addr_type) > > + ? NOP_EXPR : CONVERT_EXPR; > > NOP and CONVERT are the same. I haven't followed every GCC changes/re-org closely, but my impression is that there has been a move to make NOP and CONVERT the same. Is that correct? We retain CONVERT's between UPC pointer-to-shared that are not equivalent and that require some special logic to inter-operate or convert them. The UPC lowering pass handles those special cases. Those conversions are not NOP's. For example, a floating point to integer conversion isn't a no-op. Could use some additional guidance here.