From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75289 invoked by alias); 23 Jun 2017 11:01: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 75148 invoked by uid 89); 23 Jun 2017 11:01:16 -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,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-ot0-f169.google.com Received: from mail-ot0-f169.google.com (HELO mail-ot0-f169.google.com) (74.125.82.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Jun 2017 11:01:14 +0000 Received: by mail-ot0-f169.google.com with SMTP id 95so29093863ott.3 for ; Fri, 23 Jun 2017 04:01:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=aCg7AKw1h/V143NDje7Ay8d1QTxqD0EiiLuprNf2okc=; b=EskqAgvg0Pevkq2N0QWT19AxCoKOhoFy7wSpFamNbNLhHkfWxlcx9p08+v8PSKUMVY coq8fxFdcWQBs+9NwxWUSY1seHsGt2ckNXsFjpfwd4zy2NUIHpmFI9Di0sPGu9EM6M8U ILLGjQFmM6+Iac4Rw1FjvqRc154HCjN9ZyiNMf0ZCaBcjo0P5ODYCoFjG/hzY+So1iLL 9qCOqDMrPv8f4WkBhF76wjkibDfTt0gzk6xdAXDWuhVSqQ6mkIsc2N9Hwq0RwjNhKiPj u4nPb+nfj9O6+FWiKaxoEAeeaxtofRlz6OYkxpl6W2I2aGbHCCl34UyGAYJdCbcPmrJb t5ZQ== X-Gm-Message-State: AKS2vOyvyombtGVcU649XyzHOpDh9ANzsYfXwCIrz4D37rLIDAXV6jXy MUMoR7JMpghqC2nZOS0wgPAehUCWWA== X-Received: by 10.157.16.66 with SMTP id o2mr1125269oto.105.1498215671089; Fri, 23 Jun 2017 04:01:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.37.66 with HTTP; Fri, 23 Jun 2017 04:01:10 -0700 (PDT) In-Reply-To: <20170623103201.GC2123@tucnak> References: <85de74ae-9680-1461-a289-42c915b5285a@redhat.com> <20170623103201.GC2123@tucnak> From: Richard Biener Date: Fri, 23 Jun 2017 11:01:00 -0000 Message-ID: Subject: Re: Avoid generating useless range info To: Jakub Jelinek Cc: Aldy Hernandez , Andrew MacLeod , gcc-patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg01769.txt.bz2 On Fri, Jun 23, 2017 at 12:32 PM, Jakub Jelinek wrote: > On Fri, Jun 23, 2017 at 12:24:25PM +0200, Richard Biener wrote: >> > void >> > set_nonzero_bits (tree name, const wide_int_ref &mask) >> > { >> > gcc_assert (!POINTER_TYPE_P (TREE_TYPE (name))); >> > if (SSA_NAME_RANGE_INFO (name) == NULL) >> > set_range_info (name, VR_RANGE, >> > TYPE_MIN_VALUE (TREE_TYPE (name)), >> > TYPE_MAX_VALUE (TREE_TYPE (name))); >> > range_info_def *ri = SSA_NAME_RANGE_INFO (name); >> > ri->set_nonzero_bits (mask); >> > } >> > >> > Let me know how you'd like me to proceed. >> >> Just factor out a set_range_info_raw and call that then from here. > > And don't call it if the mask is all ones. Perhaps set_range_info > and set_nonzero_bits even should ggc_free and clear earlier range_info_def > if the range is all values and nonzero bit mask is all ones. > Or do we share range_info_def between multiple SSA_NAMEs? If yes, of course > we shouldn't use ggc_free. We shouldn't as we don't copy on change. We do for points-to but only for the bitmap pointer IIRC. Richard, > > Jakub