From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id ABBE13858C53 for ; Tue, 8 Nov 2022 17:33:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ABBE13858C53 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x629.google.com with SMTP id ud5so40519432ejc.4 for ; Tue, 08 Nov 2022 09:33:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Q/zZHRofZI8pZqWc+0kLwJxsfCy2C3Pf3igYe87wPcA=; b=XyEd+i64DP/vnVzCjQeZsCxKrfKZdoB6bg8scd3DIEhSPu2aLGGjSXbi5UXOdxgXrF cEjLC88h+d5/R0l0OCAFk15pGFDVgmWzr+TlQ3zVOlaDXL1NQN0TVWam2Abt9Vdk0clH rBJudFzlP+EkKZxSpyXNmlt4YuKPOVWRcDlyeriaU8ndvt0NCVHkQY/5xAl6krjRwUEV TYh0uDGBY/Wb0JZkTQfvM5VPsDQSJh0dK0Z98fBG8siF/jUimbSkmAF3+FAB8cG5cx/d uDo86oUjJqEgmRJlDxCv6zqbldaUMhwBHzxIWzR6k6lDRGehAqrXNSQEuI86Jl0H+phG qEVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q/zZHRofZI8pZqWc+0kLwJxsfCy2C3Pf3igYe87wPcA=; b=CnbKoD0/zirxxuBY1Ni/erZMUf81qh5K0bX4Md93P2pvElhCm2xWaXNEcND9zH6b8s ypmAh5DhRlVObzWtQ8oMwA2gZTM/pPeRVoc4jxt+ipxUOF5nQ0qdD1Chg28A+tziKyf5 m0D7pBQPqItOAZ0JCvdCU3TGo2hUgRxkjej+UiVlMN0f925FyPr3n+CPUPqwPgjVq1kh oQf/0M4OzS84Jtaq4ZpWlfQeuV2dsoVtjdCVl37aiUlT8uS4u1t0ktcDxsMGeVXS1T7T 4L4VWHI6QPFhfqkMEeu5Wcz5Mq7SM7T/AoX1YgcPSJ8BqdA9FjZiJoBf5AKUoJHLvNSX r09g== X-Gm-Message-State: ACrzQf0Li4Pm343RPUt1d31tlq8NTNd/0ojSlbvlQG73b9PKty+0D3ii 1GSxD4hK5k8VcSsx8RhNe2NoPl/UEpUF+ctLbAo= X-Google-Smtp-Source: AMsMyM4QvnxEk5TLEiqIwIEbTz+2ZV28VDYqD+8kr+1u+612CemrlapAIwqdp+UmT7FML9OiQmi2x0R/jQT6a9phS1c= X-Received: by 2002:a17:907:2c68:b0:7ad:8ba7:664a with SMTP id ib8-20020a1709072c6800b007ad8ba7664amr54270677ejc.488.1667928790165; Tue, 08 Nov 2022 09:33:10 -0800 (PST) MIME-Version: 1.0 References: <0312d474-d2de-6c68-5812-5b79f1176b0b@gmail.com> <5e948661-0429-0783-3ba4-b7150299a844@linux.vnet.ibm.com> In-Reply-To: From: Richard Biener Date: Tue, 8 Nov 2022 18:32:57 +0100 Message-ID: Subject: Re: [PATCH] sched1: Fix -fcompare-debug issue in schedule_region [PR105586] To: Surya Kumari Jangala Cc: Jeff Law , GCC Patches , Richard Sandiford Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,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 Tue, Nov 8, 2022 at 5:37 PM Surya Kumari Jangala wrote: > > Hi Richard, > > On 21/09/22 1:03 pm, Richard Biener wrote: > > On Tue, Sep 20, 2022 at 9:18 AM Surya Kumari Jangala via Gcc-patches > > wrote: > >> > >> Hi Jeff, Richard, > >> Thank you for reviewing the patch! > >> I have committed the patch to the gcc repo. > >> Can I backport this patch to prior versions of gcc, as this is an easy= patch to backport and the issue exists in prior versions too? > > > > It doesn't seem to be a regression so I'd error on the safe side here. > > Can you please clarify, should this patch be backported? It is not very c= lear what "safe side" means here. Not backporting is the safe side. Richard. > Thanks! > Surya > > > > > Richard. > > > >> Regards, > >> Surya > >> > >> > >> On 31/08/22 9:09 pm, Jeff Law via Gcc-patches wrote: > >>> > >>> > >>> On 8/23/2022 5:49 AM, Surya Kumari Jangala via Gcc-patches wrote: > >>>> sched1: Fix -fcompare-debug issue in schedule_region [PR105586] > >>>> > >>>> In schedule_region(), a basic block that does not contain any real i= nsns > >>>> is not scheduled and the dfa state at the entry of the bb is not cop= ied > >>>> to the fallthru basic block. However a DEBUG insn is treated as a re= al > >>>> insn, and if a bb contains non-real insns and a DEBUG insn, it's dfa > >>>> state is copied to the fallthru bb. This was resulting in > >>>> -fcompare-debug failure as the incoming dfa state of the fallthru bl= ock > >>>> is different with -g. We should always copy the dfa state of a bb to > >>>> it's fallthru bb even if the bb does not contain real insns. > >>>> > >>>> 2022-08-22 Surya Kumari Jangala > >>>> > >>>> gcc/ > >>>> PR rtl-optimization/105586 > >>>> * sched-rgn.cc (schedule_region): Always copy dfa state to > >>>> fallthru block. > >>>> > >>>> gcc/testsuite/ > >>>> PR rtl-optimization/105586 > >>>> * gcc.target/powerpc/pr105586.c: New test. > >>> Interesting. We may have stumbled over this bug internally a littl= e while ago -- not from a compare-debug standpoint, but from a "why isn't t= he processor state copied to the fallthru block" point of view. I had it = on my to investigate list, but hadn't gotten around to it yet. > >>> > >>> I think there were requests for ChangeLog updates and a function comm= ent for save_state_for_fallthru_edge. OK with those updates. > >>> > >>> jeff > >>>