public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "amacleod at redhat dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114151] [14 Regression] weird and inefficient codegen and addressing modes since r14-9193 Date: Tue, 12 Mar 2024 20:41:10 +0000 [thread overview] Message-ID: <bug-114151-4-Nrbk4M3Yq2@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114151-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114151 --- Comment #21 from Andrew Macleod <amacleod at redhat dot com> --- (In reply to Richard Biener from comment #19) > > While ranger has a range_on_exit API this doesn't work on GENERIC expressions > as far as I can see but only SSA names but I guess that could be "fixed" > given range_on_exit also looks at the last stmt and eventually defers to > range_of_expr (or range_on_entry), but possibly get_tree_range needs > variants for on_entry/on_exit (it doesn't seem to use it's 'stmt' context > very consistently, notably not for SSA_NAMEs ...). That would appear to be an oversight. That API has not been used very much for arbitrary generic trees. I think the original reason support for tree expressions was added was a "try this" for some other PR. It was simple to do so we lef tit in, but it never got any real traction. At least as far as I can recall :-) Currently, I think mosrt, if not all, uses of get_tree_range() are either !gimple_ssa_range_p() (commonly constants or unsupported types) or ssa_names on abnormal edges. For abnormal edges, we ought to be getting the global range directly these days instad of calling that routine. Then in get_tree_range (), we ought to be calling range_of_expr for SSA_NAMES with the provided context. I'll poke at that too. The support for general tree expressions changed the original intent of the function, and it should be adjusted. As for the on-exit/on-entry bits... we haven't had a need for entry/exit outside of ranger in the past. I had toyed with exporting those routines and making them a part of the official API for value-query, but hadn't run across the need as yet. Let me think about that for a minute. It can certainly be done. I guess we really only need an on-entry and on-exit version of range_of_expr to do everything. So if we end up with something like: range_of_expr (r, expr, stmt) range_of_expr_on_entry (r, expr, bb) range_of_expr_on_exit (r, expr, bb) And have that all work with general trees expressions.. That would solve much of this for you? > > Interestingly enough we somehow still need the > > > hunk of Andrews patch to do it :/ > That probably means there is another call somewhere in the chain with no context. However, I will say that functionality is more important than it seems. Should have been there from the start :-P.
next prev parent reply other threads:[~2024-03-12 20:41 UTC|newest] Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-02-28 13:57 [Bug tree-optimization/114151] New: [14 Regression] weird and inefficient codegen and addressing modes since g:a0b1798042d033fd2cc2c806afbb77875dd2909b tnfchris at gcc dot gnu.org 2024-02-28 14:33 ` [Bug tree-optimization/114151] " rguenth at gcc dot gnu.org 2024-02-28 14:36 ` rguenth at gcc dot gnu.org 2024-02-28 16:51 ` tnfchris at gcc dot gnu.org 2024-02-29 7:19 ` rguenther at suse dot de 2024-02-29 18:15 ` amacleod at redhat dot com 2024-03-01 9:37 ` rguenth at gcc dot gnu.org 2024-03-01 15:02 ` [Bug tree-optimization/114151] [14 Regression] weird and inefficient codegen and addressing modes since r14-9193 amacleod at redhat dot com 2024-03-04 7:47 ` rguenth at gcc dot gnu.org 2024-03-06 3:37 ` amacleod at redhat dot com 2024-03-06 7:14 ` rguenth at gcc dot gnu.org 2024-03-06 7:31 ` rguenth at gcc dot gnu.org 2024-03-06 14:57 ` amacleod at redhat dot com 2024-03-06 20:05 ` amacleod at redhat dot com 2024-03-07 8:04 ` rguenth at gcc dot gnu.org 2024-03-07 15:53 ` amacleod at redhat dot com 2024-03-07 20:37 ` law at gcc dot gnu.org 2024-03-08 10:13 ` rguenth at gcc dot gnu.org 2024-03-08 10:22 ` tnfchris at gcc dot gnu.org 2024-03-08 14:10 ` rguenth at gcc dot gnu.org 2024-03-12 9:59 ` rguenth at gcc dot gnu.org 2024-03-12 10:00 ` rguenth at gcc dot gnu.org 2024-03-12 20:41 ` amacleod at redhat dot com [this message] 2024-03-13 7:38 ` rguenth at gcc dot gnu.org 2024-03-13 17:37 ` amacleod at redhat dot com 2024-03-19 12:12 ` cvs-commit at gcc dot gnu.org 2024-03-19 12:16 ` rguenth 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-114151-4-Nrbk4M3Yq2@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: linkBe 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).