From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7643 invoked by alias); 29 Nov 2013 10:24: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 7634 invoked by uid 89); 29 Nov 2013 10:24:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.8 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RDNS_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mail-wi0-f180.google.com Received: from Unknown (HELO mail-wi0-f180.google.com) (209.85.212.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 29 Nov 2013 10:24:45 +0000 Received: by mail-wi0-f180.google.com with SMTP id hm4so1874759wib.7 for ; Fri, 29 Nov 2013 02:24:36 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.194.94.167 with SMTP id dd7mr20690738wjb.43.1385720676812; Fri, 29 Nov 2013 02:24:36 -0800 (PST) Received: by 10.195.12.114 with HTTP; Fri, 29 Nov 2013 02:24:36 -0800 (PST) In-Reply-To: <52977927.5010008@naturalbridge.com> References: <52977927.5010008@naturalbridge.com> Date: Fri, 29 Nov 2013 11:58:00 -0000 Message-ID: Subject: Re: [wide-int] small cleanup in wide-int.* From: Richard Biener To: Kenneth Zadeck Cc: Richard Sandiford , gcc-patches , Mike Stump Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg03747.txt.bz2 On Thu, Nov 28, 2013 at 6:11 PM, Kenneth Zadeck wrote: > This patch does three things in wide-int: > > 1) it cleans up some comments. > 2) removes a small amount of trash. > 3) it changes the max size of the wide int from being 4x of > MAX_BITSIZE_MODE_ANY_INT to 2x +1. This should improve large muls and divs > as well as perhaps help with some cache behavior. @@ -235,8 +233,8 @@ along with GCC; see the file COPYING3. range of a multiply. This code needs 2n + 2 bits. */ #define WIDE_INT_MAX_ELTS \ - ((4 * MAX_BITSIZE_MODE_ANY_INT + HOST_BITS_PER_WIDE_INT - 1) \ - / HOST_BITS_PER_WIDE_INT) + (((2 * MAX_BITSIZE_MODE_ANY_INT + HOST_BITS_PER_WIDE_INT - 1) \ + / HOST_BITS_PER_WIDE_INT) + 1) I always wondered why VRP (if that is the only reason we do 2*n+1) cannot simply use FIXED_WIDE_INT(MAX_BITSIZE_MODE_ANY_INT*2 + 1)? Other widest_int users should not suffer IMHO. widest_int should strictly cover all modes that the target can do any arithmetic on (thus not XImode or OImode on x86_64). Richard. > ok to commit