From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11895 invoked by alias); 10 May 2010 11:17:39 -0000 Received: (qmail 11876 invoked by uid 22791); 10 May 2010 11:17:39 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from contrabass.post.ru (HELO contrabass.post.ru) (85.21.78.5) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 May 2010 11:17:32 +0000 Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id 6E871AE798; Mon, 10 May 2010 15:17:29 +0400 (MSD) Received: from [95.24.147.50] (account aesok@post.ru HELO Vista) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPA id 206522986; Mon, 10 May 2010 15:17:29 +0400 Message-ID: <1559627802414B63BF3F07A934C165C7@Vista> From: "Anatoly Sokolov" To: "Richard Guenther" Cc: , References: <1811669158.20100507225908@post.ru> <4EE7DEB362344819B080B47ED2A9E4DB@Vista> In-Reply-To: Subject: Re: Remove build_int_cst_wide_type function. Date: Mon, 10 May 2010 11:17:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="ISO-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2010-q2/txt/msg00019.txt.bz2 ----- Original Message ----- From: "Richard Guenther" To: "Anatoly Sokolov" Cc: ; Sent: Monday, May 10, 2010 2:34 PM Subject: Re: Remove build_int_cst_wide_type function. >> Can I remame build_int_cst/build_int_cstu functions to >> hwi_to_tree/uhwi_to_tree? > > Hmm - there are a lot of calls to these, I'd prefer to leave them > as is for now. If we can make build_int_cst_wide local to tree.c > then maybe - it would be a consistent iterface. But as long > as that stays I see no reason to do it now. > The build_int_cstu used 24 times only. The build_int_cst used 876 times, but in most uses in get NULL_TREE as fitst argument that forces to do checks in the build_int_cst function: ... /* Support legacy code. */ if (!type) type = integer_type_node; ... If change NULL_TREE to integer_type_node in all calls the build_int_cst function then build_int_cst may be simplified to inline function: static inline tree build_int_cst/shwi_to_tree (tree type, HOST_WIDE_INT low) { return double_int_to_tree (type, shwi_to_double_int (low)); } I.e., can do two changes for the cost of one. Anatoly.