public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/93385] [10 Regression] wrong code with u128 modulo at -O2 -fno-dce -fno-ipa-cp -fno-tree-dce
Date: Mon, 20 Apr 2020 09:06:28 +0000	[thread overview]
Message-ID: <bug-93385-4-6D7WpbB1GH@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-93385-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #29 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to rguenther@suse.de from comment #28)
> On Fri, 17 Apr 2020, jakub at gcc dot gnu.org wrote:
> 
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93385
> > 
> > --- Comment #26 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> > For debug stmts, it would be best if we could use those
> >              DEBUG D#Y s=> parm
> >              DEBUG var => D#Y
> > added in if (param_body_adjs && MAY_HAVE_DEBUG_BIND_STMTS).
> > Though, if we remove already during the copy_bb by not actually creating the
> > stmt, I'm afraid that will mean the debug info is lost (debug stmts will be
> > reset), unless we for the lhs of to be dced stmts manually create debug
> > temporaries and debug stmts when we remap_gimple_stmt those stmts (for
> > SSA_NAMEs that are directly (or indirectly!) used in debug stmts).
> > If we do what Martin was proposing instead, i.e. copy the stmts and then DCE
> > them afterwards, it might work properly (perhaps only if we DCE them in the
> > right order).
> 
> It's true that copying everything and then DCEing is easier for debug
> stmt generation.  I didn't consider this.  That also argues for not
> remapping anything to error_mark_node.  Of course this leaves us with
> no automagic verification if we really DCEd everything required
> (esp. his handling of call arguments looks expensive and odd to me).

We could remap those to error_mark_node for -g0 and for -g to the
DEBUG_EXPR_DECLs we'd create and then just during verification make sure we
diagnose DEBUG_EXPR_DECLs in non-debug stmts (and error_mark_node).
Though, I think even right now the debug side of things even without the DCE is
not perfect, we do create a bind to cover the optimized out parameters at the
start of the function, but don't do this remapping of the SSA_NAME to that
DEBUG_EXPR_DECL, which means  that e.g. debug stmts that used to use that
SSA_NAME in some expressions are reset.
So, I think if Martin comes up with something that just doesn't handle the
debug stmts for GCC10, I can try to improve the debug side later.

  parent reply	other threads:[~2020-04-20  9:06 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-93385-4@http.gcc.gnu.org/bugzilla/>
2020-03-15 11:58 ` jakub at gcc dot gnu.org
2020-04-09  9:25 ` rguenth at gcc dot gnu.org
2020-04-17 11:50 ` jamborm at gcc dot gnu.org
2020-04-17 12:06 ` jakub at gcc dot gnu.org
2020-04-17 12:08 ` rguenth at gcc dot gnu.org
2020-04-17 12:09 ` jakub at gcc dot gnu.org
2020-04-17 12:16 ` rguenther at suse dot de
2020-04-17 13:41 ` jamborm at gcc dot gnu.org
2020-04-17 13:53 ` jakub at gcc dot gnu.org
2020-04-17 14:00 ` rguenther at suse dot de
2020-04-17 14:00 ` jamborm at gcc dot gnu.org
2020-04-17 14:11 ` jakub at gcc dot gnu.org
2020-04-17 14:23 ` jakub at gcc dot gnu.org
2020-04-20  8:14 ` rguenther at suse dot de
2020-04-20  9:06 ` jakub at gcc dot gnu.org [this message]
2020-04-20 21:02 ` jamborm at gcc dot gnu.org
2020-04-21 10:34 ` rguenth at gcc dot gnu.org
2020-04-21 13:00 ` jakub at gcc dot gnu.org
2020-05-04 12:03 ` [Bug ipa/93385] [10/11 " cvs-commit at gcc dot gnu.org
2020-05-07 11:56 ` jakub at gcc dot gnu.org
2020-05-28 12:33 ` jamborm at gcc dot gnu.org
2020-06-08 18:18 ` jamborm at gcc dot gnu.org
2020-07-23  6:51 ` rguenth at gcc dot gnu.org
2020-07-27 15:04 ` jamborm at gcc dot gnu.org
2020-11-26 12:01 ` jamborm at gcc dot gnu.org
2021-01-21 15:18 ` jakub at gcc dot gnu.org
2021-03-12 12:51 ` jamborm at gcc dot gnu.org
2021-03-30 13:12 ` jamborm at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-04-27 13:35 ` [Bug ipa/93385] [10/11/12 " jamborm at gcc dot gnu.org
2021-05-12 11:40 ` jamborm at gcc dot gnu.org
2021-06-28 16:28 ` cvs-commit at gcc dot gnu.org
2021-06-28 16:28 ` cvs-commit at gcc dot gnu.org
2021-06-28 17:30 ` [Bug ipa/93385] [10/11 " jamborm at gcc dot gnu.org
2021-11-04 17:09 ` cvs-commit at gcc dot gnu.org
2022-06-28 10:39 ` jakub at gcc dot gnu.org
2023-07-07 10:36 ` [Bug ipa/93385] [11 " rguenth at gcc dot gnu.org
2023-07-14 20:09 ` pinskia at gcc dot gnu.org
2023-07-29  8:07 ` pinskia at gcc dot gnu.org
2023-07-29  9:16 ` xry111 at gcc dot gnu.org
2023-07-29  9:43 ` rguenther at suse dot de

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-93385-4-6D7WpbB1GH@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).