public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/100303] [11/12 Regression] -fcompare-debug failure (length) with -O -fno-dce -ftracer
Date: Thu, 29 Apr 2021 16:25:10 +0000	[thread overview]
Message-ID: <bug-100303-4-wT7QIawOYM@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100303-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100303

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>:

https://gcc.gnu.org/g:c97351c0cf4872cc0e99e73ed17fb16659fd38b3

commit r12-292-gc97351c0cf4872cc0e99e73ed17fb16659fd38b3
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Thu Apr 29 17:24:57 2021 +0100

    rtl-ssa: Fix -fcompare-debug failure [PR100303]

    This patch fixes an oversight in the handling of debug instructions
    in rtl-ssa.  At the moment (and whether this is a good idea or not
    remains to be seen), we maintain a linear RPO sequence of definitions
    and non-debug uses.  If a register is defined more than once, we use
    a degenerate phi to reestablish a previous definition where necessary.

    However, debug instructions shouldn't of course affect codegen,
    so we can't create a new definition just for them.  In those situations
    we instead hang the debug use off the real definition (meaning that
    debug uses do not follow a linear order wrt definitions).  Again,
    it remains to be seen whether that's a good idea.

    The problem in the PR was that we weren't taking this into account
    when increasing (or potentially increasing) the live range of an
    existing definition.  We'd create the phi even if it would only
    be used by debug instructions.

    The patch goes for the simple but inelegant approach of passing
    a bool to say whether the use is a debug use or not.  I imagine
    this area will need some tweaking based on experience in future.

    gcc/
            PR rtl-optimization/100303
            * rtl-ssa/accesses.cc (function_info::make_use_available): Take a
            boolean that indicates whether the use will only be used in
            debug instructions.  Treat it in the same way that existing
            cross-EBB debug references would be handled if so.
            (function_info::make_uses_available): Likewise.
            * rtl-ssa/functions.h (function_info::make_uses_available): Update
            prototype accordingly.
            (function_info::make_uses_available): Likewise.
            * fwprop.c (try_fwprop_subst): Update call accordingly.

  parent reply	other threads:[~2021-04-29 16:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28  5:17 [Bug debug/100303] New: " zsojka at seznam dot cz
2021-04-28  6:26 ` [Bug debug/100303] " rguenth at gcc dot gnu.org
2021-04-28  9:47 ` jakub at gcc dot gnu.org
2021-04-28 12:36 ` rsandifo at gcc dot gnu.org
2021-04-29 16:25 ` cvs-commit at gcc dot gnu.org [this message]
2021-04-29 16:25 ` [Bug debug/100303] [11 " rsandifo at gcc dot gnu.org
2021-07-28  7:06 ` rguenth at gcc dot gnu.org
2021-09-20  6:54 ` pinskia at gcc dot gnu.org
2022-04-21  7:49 ` rguenth at gcc dot gnu.org
2023-05-29 10:04 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-100303-4-wT7QIawOYM@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).