From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id 90F953858298 for ; Wed, 21 Sep 2022 07:33:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 90F953858298 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-x62e.google.com with SMTP id lc7so11759462ejb.0 for ; Wed, 21 Sep 2022 00:33:31 -0700 (PDT) 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; bh=KtCF3bXNFfQQCIgX8bzsAT2btnS9RZcEANMgkHCVyqM=; b=nVK6RWHABxEWMjCZS4AXxCjMDFyxRPq+I6hUpwnuysJSQ/1bNBd5s2FWtYlwh7JjaT XN68RStS45GwtwT+GUvwX18o+r2P2FTjSYhw8MHcCt2o5ZZ+z9Dd1xlOrIXhsfjgqj/m 4aMt6eyPUZwDy7Ouop4OTZ+aG6BmKpQN4wYnUDCtaBZqxOtj9FFrX7w1MBJMF/NVcm6d BQ3JEC4SY/GLFpU3XvmGcounOejIwVCEc/YwaiTYKs6g/raBVOFKxhvBXOB7a9VE+IaY mhRuMlgt6Ub5DNCoI8+KMrTnwyKzW3lGkLj9qD1U/f2jbTvvoAguDsU2nv3bxDRGFHQy Ka/g== 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; bh=KtCF3bXNFfQQCIgX8bzsAT2btnS9RZcEANMgkHCVyqM=; b=07u/nPMf6Ib/NyHERRFS5zKsFF2ZfvE5Qx+JJQ4dihweI4silk/VqbUw6uyx1LQtJH nkHqfRGZ7twUCkzCrqy5suAWWhg9ym+axeOksLNZHvO4Vm86IX6bfQKLNX6OinYysviG vsovjIVJb2YVIAqpEKhZhFgV2aUKY2Q7sZn6U3weZUwgwbjcXG2GiSP4CQ4n9AiH1uJ/ E5UpTDSPkY1RrqaXhvZlg0ugCvAADImC2rOmmi6ytmf+KgSeK2mGbH/RlAfVjtJcfYpL 0UPflblg+Df6RkGWAiDn3G0QKnWOiULCHr7Iflvk8kCdpGoZ5PqDigQStT5mhZaS8Yji /WcA== X-Gm-Message-State: ACrzQf0jRaUwbwvbx7NABXMSk7Vy1zTcUp2gWPluHqJ1VVbxLQxJroKz zRpYaWe4aq+Gg3TGUuDpAh8/DciJ4EcV4hv1J2Y= X-Google-Smtp-Source: AMsMyM5NlIKYtDO6CWLjJ3KL6ZtbqJ53ZCM5/OLYDSrmVAgMk/boWPyGiwFakhXjPZEhz7ar/3T08P85TIyY7GqWWtQ= X-Received: by 2002:a17:906:8251:b0:781:8016:2dc9 with SMTP id f17-20020a170906825100b0078180162dc9mr8526516ejx.488.1663745610326; Wed, 21 Sep 2022 00:33:30 -0700 (PDT) MIME-Version: 1.0 References: <0312d474-d2de-6c68-5812-5b79f1176b0b@gmail.com> <5e948661-0429-0783-3ba4-b7150299a844@linux.vnet.ibm.com> In-Reply-To: <5e948661-0429-0783-3ba4-b7150299a844@linux.vnet.ibm.com> From: Richard Biener Date: Wed, 21 Sep 2022 09:33:18 +0200 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=-1.6 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, 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 pa= tch 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. 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 ins= ns > >> is not scheduled and the dfa state at the entry of the bb is not copie= d > >> to the fallthru basic block. However a DEBUG insn is treated as a real > >> 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 bloc= k > >> 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 little = while ago -- not from a compare-debug standpoint, but from a "why isn't the= 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 commen= t for save_state_for_fallthru_edge. OK with those updates. > > > > jeff > >