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.129.124]) by sourceware.org (Postfix) with ESMTPS id AEE3F3858D28 for ; Tue, 1 Aug 2023 15:56:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AEE3F3858D28 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=1690905369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DiEmTTVfzISTBS7HriorPHNEFOZVYI7KisEvB9nbAFg=; b=WdZ8N3u3Uc399eXVVe4C+HT0kfz05kP+JghXmh2ow7YWrhczZXdWAwNDhvUNuNUwl+F5Ok uFfmSVLPKe2OpP1bKA8QlAppjTwubwH4FA1wared0+3R/4SHkMxFDowHas80CccSLbcSf7 AT5Own1UVAEgrORhwpXxoGDxuTzNIJM= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-287-VeObWM0ZPgSlc67BJm3VPQ-1; Tue, 01 Aug 2023 11:56:07 -0400 X-MC-Unique: VeObWM0ZPgSlc67BJm3VPQ-1 Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-403b066c6e7so75515761cf.2 for ; Tue, 01 Aug 2023 08:56:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690905367; x=1691510167; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DiEmTTVfzISTBS7HriorPHNEFOZVYI7KisEvB9nbAFg=; b=IWW9FB9QV5hanjg0mFz5esA8+w20t81SE5bAH9eglvfLckAiigSZpBsxEO47z0csVJ FD2O7zcf2WahZrTzo3HzuFADeZFrb897FzNb7ZHIlk72UTPl+49rreXtEqLnRtOFcrXC R9rd64KqD3WgDvJth2f9d5B90/O2Yhhz6GpkzTdjwQehp6TwNiHYIB/vrg+qc4VEqy41 FMT56XDAD3HSAS9kT2iQG//AmbEMcCWYw92df2XLgxbPpxvo/aNkDR7zoze5t2rPLY67 NYyMvaI99KBuqm03tSF0WDwJxoB4pwqdx2XuL0GKMYyJ3XZKV2d5VO4/GIx2IvlD42mP hyqg== X-Gm-Message-State: ABy/qLb5pZJiAsFn6J6x+xTfu1RhjwYLcmfWiUakh7tb+G2lw/z+vcVz cJA6005rc/WK0FMFhE+I+uzfwq3NQOBxbvI9OWrLRSVbvP4mVl9w9Uull04INY55lRNLKi8cv6C ebKNKgOBrLJN3NxfIJA== X-Received: by 2002:a05:622a:1652:b0:40f:2230:efc with SMTP id y18-20020a05622a165200b0040f22300efcmr9398741qtj.55.1690905367208; Tue, 01 Aug 2023 08:56:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlHuy/qbmcW+JOibPEZ/uewknqaeIuTy3eD5UNq+uDHYC5oSTCVO864Vy4bzWbt/Z4xFncHNJQ== X-Received: by 2002:a05:622a:1652:b0:40f:2230:efc with SMTP id y18-20020a05622a165200b0040f22300efcmr9398730qtj.55.1690905366985; Tue, 01 Aug 2023 08:56:06 -0700 (PDT) Received: from [192.168.1.88] (192-0-143-139.cpe.teksavvy.com. [192.0.143.139]) by smtp.gmail.com with ESMTPSA id gx7-20020a05622a27c700b0040f200feb4fsm1912128qtb.80.2023.08.01.08.56.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Aug 2023 08:56:06 -0700 (PDT) Message-ID: Date: Tue, 1 Aug 2023 11:56:05 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] rtl-optimization/110587 - remove quadratic regno_in_use_p To: Richard Biener , gcc-patches@gcc.gnu.org References: <87444.123072509485600123@us-mta-376.us.mimecast.lan> From: Vladimir Makarov In-Reply-To: <87444.123072509485600123@us-mta-376.us.mimecast.lan> 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: 8bit X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 7/25/23 09:40, Richard Biener wrote: > The following removes the code checking whether a noop copy > is between something involved in the return sequence composed > of a SET and USE. Instead of checking for this special-case > the following makes us only ever remove noop copies between > pseudos - which is the case that is necessary for IRA/LRA > interfacing to function according to the comment. That makes > looking for the return reg special case unnecessary, reducing > the compile-time in LRA non-specific to zero for the testcase. > > Bootstrapped and tested on x86_64-unknown-linux-gnu with > all languages and {,-m32}. > > OK? > Richard, sorry for the delay with the answer.  I was on vacation. There is a lot of history of changes of the code.  I believe your change is right.  I don't think that RTL will ever contain noop return move insn involving the return hard register especially after removing hard reg propagation couple years ago, at least IRA/LRA do not generate such insns during its work. So the patch is OK for me.  I specially like that the big part of code is removed.  No code, no problem (including performance one).  Thank you for the patch. > PR rtl-optimization/110587 > * lra-spills.cc (return_regno_p): Remove. > (regno_in_use_p): Likewise. > (lra_final_code_change): Do not remove noop moves > between hard registers. > --- > gcc/lra-spills.cc | 69 +---------------------------------------------- > 1 file changed, 1 insertion(+), 68 deletions(-) > > diff --git a/gcc/lra-spills.cc b/gcc/lra-spills.cc > index 3a7bb7e8cd9..fe58f162d05 100644 > --- a/gcc/lra-spills.cc > +++ b/gcc/lra-spills.cc > @@ -705,72 +705,6 @@ alter_subregs (rtx *loc, bool final_p) > return res; > }