From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id 13EB73857401 for ; Fri, 25 Jun 2021 22:58:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 13EB73857401 Received: by mail-ot1-x32d.google.com with SMTP id d21-20020a9d72d50000b02904604cda7e66so9242998otk.7 for ; Fri, 25 Jun 2021 15:58:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=629YqAs6JgOaRUw8mXSarL/5cJymxlHT1rQVnwPsm1M=; b=JY65zq5ZWNTJ7cJaA9eKmL1oGn8CO2cYqcnUoXJ1TYJfnJKdM8yxgQaWUoj/IgNJtW oJ3vHLa3fJ1UpmQi81GU85goLLx5h5hPFJky9g9Fzkp5/Gld7L38rJDB725G94Bk3LZ3 ne9ID01fOWYIaBVVDqO05Lc21WYrSGAfs23cXtQMCDezqcztk2UbIcAER4kHv6aWtF8W PYU2jMW/lduoQUT62d/DiIrAYMjEYCo1T7ql2Qi+P6qfjjylw53E7ioXgVOYFZqB98mR +2cQ9LciNW/dx9VkwEsav/5+KR7RNfHbqEzWiNCOwoEArM11fXVLnvbG+uV9oV31nMlg PQVQ== X-Gm-Message-State: AOAM532T5AFsbtni4EYk7ThVMs/fZ6g5SBBqL2fhaykMhNCSQ/S3lldV EtwLG64P9AMIidTLgjaL8gDFbgUcbfc= X-Google-Smtp-Source: ABdhPJwmEXdwzsPioegXsFZzMVKmUiaRYKGnr8RJgr30G6DWpjWQtnjixsLNCtZYET8R0ToXv0qQgA== X-Received: by 2002:a9d:264a:: with SMTP id a68mr12055175otb.50.1624661903332; Fri, 25 Jun 2021 15:58:23 -0700 (PDT) Received: from [192.168.0.41] (97-118-105-195.hlrn.qwest.net. [97.118.105.195]) by smtp.gmail.com with ESMTPSA id h2sm1532063oog.16.2021.06.25.15.58.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Jun 2021 15:58:23 -0700 (PDT) Subject: Re: [COMMITTED 1/2] Adjust on_entry cache to indicate if the value was set properly. To: Andrew MacLeod , gcc-patches References: From: Martin Sebor Message-ID: Date: Fri, 25 Jun 2021 16:58:22 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jun 2021 22:58:25 -0000 I just glanced at the patch out of curiosity and the first hunk caught my eye. There's nothing wrong with the change and I like how you make the APIs const-correct! Just a note that it looks like the const in on the basic_block declaration might be missing an underscore (it should be const_basic_block). Otherwise it's superfluous. This is repeated in a bunch of places in the file and its header. Martin diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc index 4347485cf98..bdecd212691 100644 --- a/gcc/gimple-range-cache.cc +++ b/gcc/gimple-range-cache.cc @@ -132,7 +132,7 @@ non_null_ref::process_name (tree name) class ssa_block_ranges { public: - virtual void set_bb_range (const basic_block bb, const irange &r) = 0; + virtual bool set_bb_range (const basic_block bb, const irange &r) = 0; virtual bool get_bb_range (irange &r, const basic_block bb) = 0; virtual bool bb_range_p (const basic_block bb) = 0; On 6/23/21 8:27 AM, Andrew MacLeod via Gcc-patches wrote: > The introduction of the sparse bitmap on-entry cache for large BB > functions also introduced the concept that the value we ask to be > written to the cache may not be properly represented.  It is limited to > 15 unique ranges for any given ssa-name, then  it reverts to varying for > any additional values to be safe. > > This patch adds a boolean return value to the cache set routines, > allowing us to check if the value was properly written. > > Other than that, no functional change. > > Bootstrap on x86_64-pc-linux-gnu with no regressions.  pushed. > > Andrew >