public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "torvalds@linux-foundation.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/105930] [12/13 Regression] Excessive stack spill generation on 32-bit x86
Date: Fri, 24 Jun 2022 17:06:17 +0000	[thread overview]
Message-ID: <bug-105930-4-YscjfhFlsC@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105930-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #23 from Linus Torvalds <torvalds@linux-foundation.org> ---
(In reply to Jakub Jelinek from comment #22)
> 
> If the wider registers are narrowed before register allocation, it is just
> a pair like (reg:SI 123) (reg:SI 256) and it can be allowed anywhere.

That was more what I was thinking - why is the DImode information being kept so
long?

I realize that you want to do a lot of the early CSE etc operations at that
higher level, but by the time you are actually allocating registers and
thinking about spilling them, why is it still a DImode thing?

And this now brings back my memory of the earlier similar discussion - it
wasn't about DImode code generation, it was about bitfield code generation
being horrendous, where gcc was keeping the whole "this is a bitfield"
information around for a long time and as a result generating truly horrendous
code. When it looked like it instead should just have turned it into a load and
shift early, and then doing all the sane optimizations at that level (ie
rewriting simple bitfield code to just do loads and shifts generated *much*
better code than using bitfields).

But this is just my personal curiosity at this point - it looks like Roger
Sayle's patch has fixed the immediate problem, so the big issue is solved. And
maybe the fact that clang is doing so much better is due to something else
entirely - it just _looks_ like it might be this artificial constraint by gcc
that makes it do bad register and spill choices.

  parent reply	other threads:[~2022-06-24 17:06 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-11 20:51 [Bug c/105930] New: " torvalds@linux-foundation.org
2022-06-11 23:20 ` [Bug target/105930] " torvalds@linux-foundation.org
2022-06-11 23:54 ` [Bug target/105930] [12/13 Regression] " pinskia at gcc dot gnu.org
2022-06-11 23:59 ` pinskia at gcc dot gnu.org
2022-06-12  0:20 ` torvalds@linux-foundation.org
2022-06-12  0:20 ` torvalds@linux-foundation.org
2022-06-12  0:27 ` torvalds@linux-foundation.org
2022-06-12  2:26 ` sneves at dei dot uc.pt
2022-06-12  6:28 ` roger at nextmovesoftware dot com
2022-06-12 16:18 ` torvalds@linux-foundation.org
2022-06-12 16:35 ` torvalds@linux-foundation.org
2022-06-12 17:30 ` torvalds@linux-foundation.org
2022-06-13  9:29 ` jakub at gcc dot gnu.org
2022-06-13 17:39 ` torvalds@linux-foundation.org
2022-06-13 18:23 ` sneves at dei dot uc.pt
2022-06-13 18:31 ` torvalds@linux-foundation.org
2022-06-14  7:57 ` rguenth at gcc dot gnu.org
2022-06-14  8:50 ` jakub at gcc dot gnu.org
2022-06-14  9:42 ` jakub at gcc dot gnu.org
2022-06-14  9:50 ` jakub at gcc dot gnu.org
2022-06-16 10:06 ` arnd at linaro dot org
2022-06-24  6:17 ` cvs-commit at gcc dot gnu.org
2022-06-24 16:45 ` torvalds@linux-foundation.org
2022-06-24 16:55 ` jakub at gcc dot gnu.org
2022-06-24 17:06 ` torvalds@linux-foundation.org [this message]
2022-06-24 17:19 ` torvalds@linux-foundation.org
2022-06-24 17:33 ` jakub at gcc dot gnu.org
2022-06-30 10:03 ` cvs-commit at gcc dot gnu.org
2022-07-10  8:01 ` roger at nextmovesoftware dot com
2022-07-10 16:41 ` torvalds@linux-foundation.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-105930-4-YscjfhFlsC@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).