From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id 97D1F3858C24 for ; Fri, 5 Apr 2024 15:09:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 97D1F3858C24 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 97D1F3858C24 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::634 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712329770; cv=none; b=lLKzUgN6hGwqnI7M2iAjDD6CuH/yTtM2IvyH/UZj7HWe/LqFgcw2x9+Xe7BX0rAY33lcRCC7QGaa0kPFDMzC+lHvIfmf/4g86OB7ChLIi51jBVv7AEAU6xX8dBrUbDCrbxI9RjKcZEdt/FYK+dw98Pyn398ZT2Vf5XZ4lkLuNyk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712329770; c=relaxed/simple; bh=c+pSY/21EkQ/7M60RO2QhzPScPFyRsUqOlW9QDD8624=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=dsKgysYhn/lAaRv/dNkUek9Q/oWnJefGKesnDEe3Wiq1ZK4oXTGT96tkOpinvLTi95HYym1NWWz2bDV/rESEsKtbjf/iJ4vNVXWGdauZ86cwHZHErm7QE67OWLVW5mOdKEMPUHXJ7fZFWgeov+CPcX/tR3xV5Y1pR8gnW4RWP+Q= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1e0f2798cd8so20690985ad.3 for ; Fri, 05 Apr 2024 08:09:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712329766; x=1712934566; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=9aVI5entVH2mtHaTtp3s6BHPdvVkQiJHPto3vPq2EKc=; b=T7/mM06xhZfSvxObjZvgaAK0wGWSLOvMZV1p6B9qoJyp7Ig4ECIbckjb2F6HgyYcr1 S2Phnkne5eZ1nI3AGSKcl1T3EcUDKPTio993l4wYt5XaXMYpt4wNqNY1QB8NzQSohJy4 xpe7CfwrI0M1mR9ed4kpufZ6kG33p1rnVE5zJ0uaQtBByMIfiAbnb9nM86f1HLXCz8x+ c+tWmKiK8trvPMUFA/jJ/tIJWMUvUabb3P1B5PxFV6h3kjmBOOzoimiV21IL0+HxG1Dx mxQ5gNabKcX7EcP17doEL8r67vbDBu6Qn3VAGqtXWXQdOiH9p9buUl6TlptmuB7fuqDR aV2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712329766; x=1712934566; 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=9aVI5entVH2mtHaTtp3s6BHPdvVkQiJHPto3vPq2EKc=; b=Z5vKwCFECirGgaqRrm5p9wmgd2nh1g3WPcENE1k20aRg47yXgRXftA28dHX62b8nTu URHkhVEHs+qzWIPOX2rvrmGmGEqLYYKy/dvN1Xe78+BcgBkvUdKX0K6p0713xwU0xrxy daNhhcw+8Etwg7CgCqulkB8tPylVAaN8ivcA5EdzRph49qoYfEFFjQkXgE6sDdeqoIz4 liesM9I7JXm67iyKu/c1jkcvg2Emxwj/FiX2MmFLRsxzuhAwlJgPJQtPT5hYwvZh98kD 4zqc16Tq3rhavaejoCaRKDP5AkL/9yvPRitz0QnlLt8f/5Yi1YESMrWmt2647wb25sMu XnZg== X-Forwarded-Encrypted: i=1; AJvYcCUhzhZN1pA2EU935OXRE1PNmDWI652S0bgBQNhqgJzzDmdO5TlQ/odbS+VRPPraiqBacOYYIsyIVdeZGS9uF7C78MGpIAtX+A== X-Gm-Message-State: AOJu0YxCtPl8IKFeJswmYGq/TzQpquSly/ck1OflIQBy4IfmbQ+CKu9I fJ+OEqKv/8PTyGuR7eUqw7w+wDsFpG3Q07MA3XM764Yez1Z2TA801tc0SLn8lu8= X-Google-Smtp-Source: AGHT+IHS5TWeSivS6xMqH3YjLTO6OQ+ZN2fH/4kWaAmsgnzLtY5jYIoKuiDRPGIyxaLtYReJErqnMg== X-Received: by 2002:a17:902:c405:b0:1dd:c953:cfa0 with SMTP id k5-20020a170902c40500b001ddc953cfa0mr1843360plk.48.1712329766207; Fri, 05 Apr 2024 08:09:26 -0700 (PDT) Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id y20-20020a170903011400b001d8f81ecea1sm1685893plc.172.2024.04.05.08.09.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Apr 2024 08:09:25 -0700 (PDT) Message-ID: <46b18cf0-cc20-4fb2-a347-89d3f9f13b37@gmail.com> Date: Fri, 5 Apr 2024 09:09:24 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH] middle-end/114579 - speed up add_scope_conflicts Content-Language: en-US To: Richard Biener , gcc-patches@gcc.gnu.org Cc: Jakub Jelinek , Michael Matz References: <20240404124128.752263858C78@sourceware.org> From: Jeff Law In-Reply-To: <20240404124128.752263858C78@sourceware.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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 4/4/24 6:41 AM, Richard Biener wrote: > The following speeds up stack variable conflict detection by recognizing > that the all-to-all conflict recording is only necessary for CFG merges > as it's the unioning of the live variable sets that doesn't come with > explicit mentions we record conflicts for. > > If we employ this optimization we have to make sure to perform the > all-to-all conflict recording for all CFG merges even those into > empty blocks where we might previously have skipped this. > > I have reworded the comment before the all-to-all conflict recording > since it seemed to be confusing and missing the point - but maybe I > am also missing something here. > > Nevertheless for the testcase in the PR the compile-time spend in > add_scope_conflicts at -O1 drops from previously 67s (39%) to 10s (9%). > > Bootstrapped and tested on x86_64-unknown-linux-gnu, OK for trunk? > > Thanks, > Richard. > > PR middle-end/114579 > * cfgexpand.cc (add_scope_conflicts_1): Record all-to-all > conflicts only when there's a CFG merge but for all CFG merges. OK. Your call on whether or not to include in gcc-14 or wait for gcc-15. jeff