From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by sourceware.org (Postfix) with ESMTPS id 11DD138768A2 for ; Fri, 10 Nov 2023 14:28:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 11DD138768A2 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 11DD138768A2 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d2d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699626508; cv=none; b=JrqcQVkVtb1Mccx1pRfCP68CXoCEi5u08t08o42GwvTvvAFnqQYERsGnLa3rDlDK8KYlB57bO4RQyLJzjZdYt0EP1YLxoTeWJitatS4yqtLMM/GMobLY5lcrQ1joEYYMCAmL+KehPs0gZD5jqS9WRpGlvuhj+RbugzvaK0Ehw7c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699626508; c=relaxed/simple; bh=bkIdO24XqItDjUXfw1moCNpMBj0A4tItYeav5ZRdXVM=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=i7wbsTUylu+8AaXTkItPa72K6wRvggN7BRgcm2Zt0z8/v6OxBxPOaEzwR6GBEcmrnoT7LW2CAcXLtGYvA+x/w8qXzqTKW/YVoRlziyPo/6ajMkUMcnBaByRD86HzL9DPhBHoYJ2zx9rPfXL5Zv2Ds/IrYck1Ty1bLrm/D2oiPo4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd2d.google.com with SMTP id ca18e2360f4ac-7a68d1698adso53106439f.1 for ; Fri, 10 Nov 2023 06:28:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699626506; x=1700231306; 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=ZCcMH1LFUzHn2F2PSLNT18QUd1WxM4esaFTTvhkCpaA=; b=HxwdtptDRNDzshtZPtFrv5eNK111heZqSGs2D+6SqMfQEm5CzQ54uyn4ajyxgqVIHV lGreUSlRrKwI0oIvJaaE/T4Yz5LdpnUKx90zD5//456UoJYHMst/zn3yCmJ6iUd1s4pk Pen0lAV58QEGHYQaW0nDI4bYpgyH03ZIMmyVUioRu1APilyzeyD1FBjhKoytQC3OtxUo QhZkUbcTygRJJoQa0woBl1qVoWBmZkcG48lK6sHUZGCaY/InB6vOucXFVH6AhM5mnJRH OAnKiMOrVpwHvzPnOs/e2MWpS1EUwyaCTOJpVNPbCynzZXlmKDL34XhEjnf140fDZj8e anQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699626506; x=1700231306; 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=ZCcMH1LFUzHn2F2PSLNT18QUd1WxM4esaFTTvhkCpaA=; b=rbCfIdFb71j031bL0faMsaomdNon+XjDzUSm2yDqgjaGQKiotMr+6SGac7Xziy7rw2 jnwrNNWLCBkunZmVdnEwhafM9vr1aD087coN5u8DsTvd55Q8f1oMmZIdiGvLS42WnXLs DF0IDhgn/MUIFDTbqLNlMK5bJduLdtL/X7z5yM3yDefEYJC9Ef2LvgWKF/UNT1bAAfMk rOS9VAChp+NlPcLJnukXc0em/DxMviTttCNb0aipmYvtIjOJq77Iz1QHS7PS1TdPJ6+y CmQIy44fMakqMLlDx+Sgpz4d+J/0PdTfcQDWi1eDCy4zconUgTXe/xoW6k2HlKeZ/r0r H1nQ== X-Gm-Message-State: AOJu0YyK3+V1r/q7HCVLi+39il+82NhztdqcBDWSrtS0kh7OzlqS4489 CIHEvF8T3Q9TwjlYXVhjlro= X-Google-Smtp-Source: AGHT+IEYMiV/k1m7jc3udr20US2yeZLHYQpMz5fnW9Fjx58EmoAVtdQM/gZiyi1BsN8nLbyVWE6Z6A== X-Received: by 2002:a5d:835a:0:b0:792:8c29:7b with SMTP id q26-20020a5d835a000000b007928c29007bmr1639428ior.10.1699626506132; Fri, 10 Nov 2023 06:28:26 -0800 (PST) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id f18-20020a6be812000000b007a667c41368sm4512568ioh.54.2023.11.10.06.28.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Nov 2023 06:28:25 -0800 (PST) Message-ID: <632a0968-414d-46ce-b8aa-032c06b7018c@gmail.com> Date: Fri, 10 Nov 2023 07:28:24 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/7] ira/lra: Support subreg coalesce Content-Language: en-US To: Lehua Ding , gcc-patches@gcc.gnu.org, vmakarov@redhat.com, juzhe.zhong@rivai.ai, richard.sandiford@arm.com References: <20231108034740.834590-1-lehua.ding@rivai.ai> <1271847054F02C54+aff62c2d-3647-4801-a2c1-153a68cca1e2@rivai.ai> <1F98D652F8354D99+692b2d7a-e504-444b-b4b5-4c1d2786d40c@rivai.ai> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 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,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 11/10/23 03:39, Richard Sandiford wrote: > Lehua Ding writes: >> On 2023/11/10 18:16, Richard Sandiford wrote: >>> Lehua Ding writes: >>>> Hi Richard, >>>> >>>> On 2023/11/8 17:40, Richard Sandiford wrote: >>>>> Tracking subreg liveness will sometimes expose dead code that >>>>> wasn't obvious without it. PR89606 has an example of this. >>>>> There the dead code was introduced by init-regs, and there's a >>>>> debate about (a) whether init-regs should still be run and (b) if it >>>>> should still be run, whether it should use subreg liveness tracking too. >>>>> >>>>> But I think such dead code is possible even without init-regs. >>>>> So for the purpose of this series, I think the init-regs behaviour >>>>> in that PR creates a helpful example. >>>> >>>> Yes, I think the init-regs should be enhanced to reduce unnecessary >>>> initialization. My previous internal patchs did this in a separate >>>> patch. Maybe I should split the live_subreg problem out of the second >>>> patch and not couple it with these patches. That way it can be reviewed >>>> separately. >>> >>> But my point was that this kind of dead code is possible even without >>> init-regs. So I think we should have something that removes the dead >>> code. And we can try it on that PR (without changing init-regs). >> >> Got it, so we should add a fast remove dead code job after init-regs pass. > > I'm just not sure how fast it would be, given that it needs the subreg > liveness info. Could it be done during RA itself, during one of the existing > instruction walks? E.g. if IRA sees a dead instruction, it could remove it > rather than recording conflict information for it. > Yea, it's a real concern. I haven't done the analysis yet, but I have a sense that Joern's ext-dce work which Jivan and I are working on (which does sub-object liveness tracking) is having a compile-time impact as well. Jeff