From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by sourceware.org (Postfix) with ESMTPS id E8C3D3858CDB for ; Tue, 24 Oct 2023 17:21:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E8C3D3858CDB 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 E8C3D3858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::532 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698168108; cv=none; b=F7pOJ5LZ1ODgT3JtmLqM1j84Slwm8PNczH+zhlCn+kHjMeC+DywTdbczYHG3xkk+tN2nVBSjRmMWt2BIpEUQxTXKUZ1Fa1UF+cl+kVjygLGKZFNobXn9553WfRE9D+6UQmqeiX31xtufqcvHEEOqiIgcJgb09REXQ/RqGBD9/Zw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698168108; c=relaxed/simple; bh=uT/UyCNCTL8jpVC8PqW9LkxGyhi2BKYT0OROI4UGblA=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=olUrfW8p39Y/mJ/OYBonv+qw/e5X01OuvRBAmJLXcMHvBz4b/hPJ23YHwAJRjQUTEyboGiEZfMMR1B9Rf2BdKa2Y72podrI8OlcQBkcIf6DKwMdz0dfMsK/0n1aCymCAJcS+Rwuejz+fxuOz1mV2JmfnKkfcmVn9HPvJvLq4hKQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-5ac865d1358so2988312a12.3 for ; Tue, 24 Oct 2023 10:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698168097; x=1698772897; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=f2F+xioM7yVyCkoPge9GKyFzndBqDxYWfc70Gsj/hT0=; b=JOHNCYcWZ6is9A/0u019UeVxCVvfmtljo8DwCgurJUEDCClyYPQaX0e5qEAtB3tP+U SUr2D0//M0szVz8zYNg+qQRbslXHCPjjYrm9Bzuwy9DuCzYflEIOUrZgkxoYinupfSlJ rCKHKimMSOYlzNnohT8lGrdaap7aEUDBU/w38bwVontRc3avmBw5+JnE9KWNBnjKqQUO 4yMp8VvTlnOGmtigH2si8tmSsOlLGo6Gnr0Rg7UHvlOXdDD3v2dF6zUURxoy6vGzdl4b Wag64GL4BxMFefzBBZ1AwMynY7dc1Nq6VMFZHzf9lJOpUkZS0QVdFQddlqWjCKh0wqhA oARQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698168097; x=1698772897; h=content-transfer-encoding:in-reply-to:from:references: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=f2F+xioM7yVyCkoPge9GKyFzndBqDxYWfc70Gsj/hT0=; b=DXmiDaVdWa9WKHmWLOFlQYV/rznm3Dju+3VMVgGP3veE1JFlMuyQ1QOddeGJUcIAmD vM86RE5UnFMo1U1XHb9qlKo785WX1weRPn5cLZ8LTohvnDZyEvN3yuiTAuH/D+FWBFIi c02aD/9STmKNCTHmyp+lUbix8tROzE+AyR6V2T00StMHoG3Osbu5PD4/EWuRpHzxcE4W QobUhQcX6NcFPaqETLff0mFPrGBaXzN7F7k0OpACti7CmnL/bHn6AhNs3twrsB6Gg/EQ 9bSCMlTyTxzNo/f9zmwU/u38vCn4mVJafdpr3Krk5wIw+/zNi3iwo33PW6mS9uK0oQ/E x2pQ== X-Gm-Message-State: AOJu0YzmF9ZYz2Xop8OpTK9XCRxTnoY7o6kcwgc9tff9bAHJSu7GNwIn FRLQQ12e9FHmDhZM7nPdL2Y= X-Google-Smtp-Source: AGHT+IHyyOf+nFF/ilIu649OR30nC75pevg+N0EStQuVKlS+6T68IGAkH4+AQOTUzjXhqrCH0xbrXA== X-Received: by 2002:a05:6a20:8e0f:b0:160:58f5:693b with SMTP id y15-20020a056a208e0f00b0016058f5693bmr3480065pzj.44.1698168096628; Tue, 24 Oct 2023 10:21:36 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id y92-20020a17090a53e500b00274e3e5f334sm1283983pjh.0.2023.10.24.10.21.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Oct 2023 10:21:35 -0700 (PDT) Message-ID: Date: Tue, 24 Oct 2023 11:21:30 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/6] rtl-ssa: Ensure global registers are live on exit Content-Language: en-US To: Richard Sandiford , jlaw@ventanamicro.com, gcc-patches@gcc.gnu.org References: <20231024105006.3337671-1-richard.sandiford@arm.com> <20231024105006.3337671-2-richard.sandiford@arm.com> From: Jeff Law In-Reply-To: <20231024105006.3337671-2-richard.sandiford@arm.com> 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 10/24/23 04:50, Richard Sandiford wrote: > RTL-SSA mostly relies on DF for block-level register liveness > information, including artificial uses and defs at the beginning > and end of blocks. But one case was missing. DF does not add > artificial uses of global registers to the beginning or end > of a block. Instead it marks them as used within every block > when computing LR and LIVE problems. > > For RTL-SSA, global registers behave like memory, which in > turn behaves like gimple vops. We need to ensure that they > are live on exit so that final definitions do not appear > to be unused. > > Also, the previous live-on-exit handling only considered the exit > block itself. It needs to consider non-local gotos as well, since > they jump directly to some code in a parent function and so do > not have a path to the exit block. > > gcc/ > * rtl-ssa/blocks.cc (function_info::add_artificial_accesses): Force > global registers to be live on exit. Handle any block with zero > successors like an exit block. OK jeff