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 target/108938] Missing bswap detection
Date: Tue, 07 Mar 2023 08:40:18 +0000	[thread overview]
Message-ID: <bug-108938-4-eow3r8KH4r@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108938-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Hongtao.liu from comment #11)
> (In reply to Jakub Jelinek from comment #9)
> > Though, if more than one replacement operation is emitted, one needs to be
> > careful not to emit more expensive replacement than the original sequence
> > (especially if some subexpressions aren't single use).
> 
> The patch(support swap + bit_and + rotate) doesn't show much impact on
> SPEC2017, is there any other benchmark that I can try to find some
> performance regressiones with bswap + bit_and + rotate?
> So that I'll restrict the patch to only bswp + rotate/shift.

I didn't mean to look at SPEC numbers, I meant count number of statements that
could be DCEd.  The code currently computes n_ops as it walks the statements
that compute the value.  So, the idea would be to have another counter next to
it, initialized
very similarly, except on a statement that !has_single_use it would be reset to
zero (essentially not counting that statement or any of its defining statements
(transitively)).
So it would count solely the statements that could be DCEd.

  parent reply	other threads:[~2023-03-07  8:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-27  2:51 [Bug target/108938] New: " crazylht at gmail dot com
2023-02-27  8:11 ` [Bug target/108938] " jakub at gcc dot gnu.org
2023-02-27  8:39 ` crazylht at gmail dot com
2023-02-27  9:01 ` jakub at gcc dot gnu.org
2023-02-27  9:40 ` jakub at gcc dot gnu.org
2023-03-06  9:52 ` crazylht at gmail dot com
2023-03-06  9:56 ` jakub at gcc dot gnu.org
2023-03-06  9:57 ` crazylht at gmail dot com
2023-03-06 10:05 ` crazylht at gmail dot com
2023-03-06 10:09 ` jakub at gcc dot gnu.org
2023-03-06 10:41 ` rguenth at gcc dot gnu.org
2023-03-07  2:52 ` crazylht at gmail dot com
2023-03-07  8:40 ` jakub at gcc dot gnu.org [this message]
2023-03-07  8:53 ` crazylht at gmail dot com
2023-03-09  2:21 ` crazylht at gmail dot com
2023-03-09  5:50 ` crazylht at gmail dot com
2023-03-10 17:54 ` pinskia at gcc dot gnu.org
2023-05-30  9:54 ` cvs-commit at gcc dot gnu.org
2023-05-30 23:19 ` crazylht at gmail dot com

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-108938-4-eow3r8KH4r@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).