public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/107006] Missing optimization: common idiom for external data
Date: Fri, 23 Sep 2022 06:11:16 +0000	[thread overview]
Message-ID: <bug-107006-4-uMmHXB7W8S@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107006-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to H. Peter Anvin from comment #11)
> If you look at the output, you see that the loops are already fully unrolled
> (at considerable code size cost.)

The unrolling is done too late for the bswap detection pass to trigger.

> Unfortunately, since the issue at hand is dealing with code written to be
> portable, adding gcc-specific hacks are not really a reasonable option.

Well, #pragma GCC unroll n is "portable" in that #pragma is an ISO C feature
and pragmas in the 'GCC' domain are supposed to be ignored by other compilers,
so not sure what you are wanting to say here.

You can also manually unroll of course.

Alternatively somebody can try to implement loop pattern matching for
bswap/load.  It's a reduction so blueprints might be available by the
strlen pattern matching in loop_distribution::transform_reduction_loop.

      parent reply	other threads:[~2022-09-23  6:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22  2:27 [Bug rtl-optimization/107006] New: " hpa at zytor dot com
2022-09-22  2:28 ` [Bug rtl-optimization/107006] " hpa at zytor dot com
2022-09-22  2:28 ` hpa at zytor dot com
2022-09-22  2:28 ` hpa at zytor dot com
2022-09-22  2:29 ` hpa at zytor dot com
2022-09-22  2:30 ` hpa at zytor dot com
2022-09-22  2:30 ` hpa at zytor dot com
2022-09-22  2:30 ` hpa at zytor dot com
2022-09-22  2:31 ` hpa at zytor dot com
2022-09-22  2:32 ` hpa at zytor dot com
2022-09-22  7:08 ` [Bug tree-optimization/107006] " rguenth at gcc dot gnu.org
2022-09-22 14:26 ` hpa at zytor dot com
2022-09-23  6:11 ` rguenth at gcc dot gnu.org [this message]

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-107006-4-uMmHXB7W8S@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).