From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id C1833385840B for ; Mon, 4 Oct 2021 20:57:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C1833385840B Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-187-bgKe17EwPzye-xB5pk5sJA-1; Mon, 04 Oct 2021 16:57:50 -0400 X-MC-Unique: bgKe17EwPzye-xB5pk5sJA-1 Received: by mail-qk1-f200.google.com with SMTP id bi20-20020a05620a319400b0045df2735d63so25170740qkb.2 for ; Mon, 04 Oct 2021 13:57:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=G3CUyLYChm/PYwVPnYN+V5kjI8ANkYx2OPOPas0nwxg=; b=IUaPH4tkWkUwV8z6ffHdUA7PfrHL6AaXxUHZmYFzAKYSmG1mutSiMvvCJ+po54jOiB riuCYpATO5GK7Bss3pZdx86HW1KIdyfAwBmxF2RbnFj2hwhseKFuiMq6Tguc1tom1aJM 7IXr1ue7DDv/G7t6g7h4pwCphve/IDgovhPCK6b4PAiv8HF3CiRVCWtp75Zi3KqA4s0d LF9zT9H5rieB5GE/ZeQA4eyd22Z2O1zImXJ9U5dSj8BqOmXWQb+3p3LukCoIy5p3BheB nPLxN2J3LErEx7No2X+VybTik44Hvsd5/EuLUlyN/Rt+10DzmMXYhVPJarXOt3PRalSV tdPQ== X-Gm-Message-State: AOAM5304s9yP1Ln19Ueno943jmTAdRJ/V+ArEkAdSkTELuZZw4Kq6M0+ 2edOBfmBNbw+eyYny38RGr9F8LhPRHOoqTirsD7KABKvIdAl700060oxi8fwgrvkmiIxJiO1lAX YJrCAOvTqNQMmdm2mJTlY1w4wH0A9Vb2Miz1SP3lsIEyKLI4UAvWU6o+evNYQwhaMxOcURQ== X-Received: by 2002:a05:622a:1cd:: with SMTP id t13mr15923063qtw.283.1633381069711; Mon, 04 Oct 2021 13:57:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdxqVSexghbMzgpSxh1JEbQqn2wkU/PYlHcnt2MPsl5bMFR2wWvxqespHGiaBb9GyJ3cZR2g== X-Received: by 2002:a05:622a:1cd:: with SMTP id t13mr15923051qtw.283.1633381069442; Mon, 04 Oct 2021 13:57:49 -0700 (PDT) Received: from [192.168.0.102] ([104.219.123.55]) by smtp.gmail.com with ESMTPSA id h17sm10259211qth.42.2021.10.04.13.57.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Oct 2021 13:57:48 -0700 (PDT) Subject: Re: [PATCH] Remove static marker for range in alloca pass. To: Richard Biener , Aldy Hernandez Cc: GCC patches References: <20211004065412.1515395-1-aldyh@redhat.com> From: Andrew MacLeod Message-ID: <2e606f3e-f207-1769-162c-71ca473d4575@redhat.com> Date: Mon, 4 Oct 2021 16:57:47 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-CA X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Mon, 04 Oct 2021 20:57:53 -0000 On 10/4/21 4:15 AM, Richard Biener via Gcc-patches wrote: > On Mon, Oct 4, 2021 at 8:55 AM Aldy Hernandez via Gcc-patches > wrote: >> The m_ranges[] field in int_range are trees, so they live in GC >> space. Since invalid_range is static, it must be marked with GTY >> magic. However, calculating invalid_range is not particularly slow, >> or on a critical path, so we can just put it in local scope and >> recalculate every time. >> >> Tested on x86-64 Linux. >> >> Since this is more of a GC thing than a range thing, I'd like a nod from >> a global reviewer. >> >> OK? > OK, but can we somehow make int_range<>::intersect work > with non-tree as well? That is, can we somehow make this > operation w/o constructing temporary trees? > > Thanks, > Richard. Yeah, I'll shortly provide an intersect which takes 2 wide_ints, along with some other performance improvements.  It can be more efficient since the general case has to build into a temporary range, and if its single pair, we can go directly into the original range, and possible even avoid ever creating a new tree. Andrew