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 [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id EEC593858C50 for ; Mon, 15 May 2023 15:07:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EEC593858C50 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684163259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TuiWnUQItiaAgij5hXtK13FGG9Fudqjh1v9O4S6K7SA=; b=eobbuMQDozD2QC022y33bs2BPxMvZcTpF81ifymENozPm6vQ++1U8X5ECXr5wPZqpbIiF8 WMvhFb9PSU5PSO39Ok1nUgHSzRE805YFvmNl0I9XczfwAs7eZTJDrungwdZkjjdM+aNU3Y 5D3JdkMDWYFqT81V8H4gURt1mz17ye8= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-22-cBGajOtjOCmErij48uYYTQ-1; Mon, 15 May 2023 11:07:36 -0400 X-MC-Unique: cBGajOtjOCmErij48uYYTQ-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-3077fa61967so7051489f8f.1 for ; Mon, 15 May 2023 08:07:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684163255; x=1686755255; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TuiWnUQItiaAgij5hXtK13FGG9Fudqjh1v9O4S6K7SA=; b=KiQjSWVJ5ilQNZnWrvDEtB6fDxp0pPzpRb17ruWxJpY1S32DvLjQx+zSvZlMTjMbX/ q5n3y1afarnxIqmvyf4//5LLqPdIcafZjhnkskxhrxW9DuGkQ6MM/PhUTK883voGp8DO r6FOln/NoPf6Ni+lVFllQo85GGMvfUOtnPOstxxlQ4YPMklu1YD5+6rF76yrVOohwiY8 7G+q4DkqbSoruVMoYrhs/kksY50LXdOQcXS2Fo47S0M60FMFrZoP2UsHJa8KYy7c1sKO Zm3H8bDLKHFohu08zOF5J0GtlCcLjkkF88uqP63DOkcuRLEmxzHWUze+216C197t9dFe fjDA== X-Gm-Message-State: AC+VfDzEEsOI0DV9fNLdZJzaEBLh+CsInVMMhfqW4q13RJGQJCiL2TAY KrXJRDigdP2SkaU1mqEcFgyzXTRv7eo/nSdoS0L4zmiZEIuOfui2UQlRRjzClxMiJBThvxJRZaZ CeOZk515Rl52LgwCTCw== X-Received: by 2002:a05:6000:cc:b0:307:95ac:a3f with SMTP id q12-20020a05600000cc00b0030795ac0a3fmr17224710wrx.23.1684163255205; Mon, 15 May 2023 08:07:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4pheKI1UkxxuCxyyIH2IX7r4OuLGqSMLqGJGoPJS0/UDy9oUatWdNoNsbrFf75JEN3rfnvew== X-Received: by 2002:a05:6000:cc:b0:307:95ac:a3f with SMTP id q12-20020a05600000cc00b0030795ac0a3fmr17224693wrx.23.1684163254859; Mon, 15 May 2023 08:07:34 -0700 (PDT) Received: from [192.168.1.201] ([139.47.42.170]) by smtp.gmail.com with ESMTPSA id l9-20020a5d5609000000b0030785b864f1sm23447wrv.65.2023.05.15.08.07.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 May 2023 08:07:34 -0700 (PDT) Message-ID: Date: Mon, 15 May 2023 17:07:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] Add auto-resizing capability to irange's [PR109695] To: Jakub Jelinek Cc: GCC patches , Andrew MacLeod , Richard Biener , mjambor@suse.cz References: <20230515103523.100412-1-aldyh@redhat.com> From: Aldy Hernandez In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 5/15/23 12:42, Jakub Jelinek wrote: > On Mon, May 15, 2023 at 12:35:23PM +0200, Aldy Hernandez wrote: >> gcc/ChangeLog: >> >> PR tree-optimization/109695 >> * value-range.cc (irange::operator=): Resize range. >> (irange::union_): Same. >> (irange::intersect): Same. >> (irange::invert): Same. >> (int_range_max): Default to 3 sub-ranges and resize as needed. >> * value-range.h (irange::maybe_resize): New. >> (~int_range): New. >> (int_range::int_range): Adjust for resizing. >> (int_range::operator=): Same. > > LGTM. > > One question is if we shouldn't do it for GCC13/GCC12 as well, perhaps > changing it to some larger number than 3 when the members aren't wide_ints > in there but just trees. Sure, in 13/12 the problem is 10x less severe > than in current trunk, but still we have some cases where we run out of > stack because of it on some hosts. Sure, but that would require messing around with the gt_* GTY functions, and making sure we're allocating the trees from a sensible place, etc etc. I'm less confident in my ability to mess with GTY stuff this late in the game. Thoughts? Aldy