public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "amylaar at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/20211] New: autoincrement generation is poor Date: Fri, 25 Feb 2005 22:08:00 -0000 [thread overview] Message-ID: <20050225161912.20211.amylaar@gcc.gnu.org> (raw) When a processor does not allow register+offset addressing for a register class, as for the floating point registers on the SH3E / SH4, the way to avoid excessive reloads and to expose the issue to the rtl optimizers is to disallow this addressing mode for the machine modes for which pseudo registers are usually allocated to the register class in question, i.e. SFmode / DFmode in our example. Thus, when there is a structure access to a member with such a mode and a non-zero offset, the address cannot be expressed directly, and thus, during rtl expansion, the sum is calculated into a pseudo register first. cse typically places these additions together at the start of a basic block; the idea there is that we might find some cse opportunities, and if not, combine can do something with these sums. However, that doesn't work when these sums are used as addresses and the machine mode of the access does not allow reg+offset addressing. The auto-increment generation is flow can't do anything useful with these sums either, since the auto-inc generation in flow only looks for cases where a memory access already matches an exitsing add. Thus we end up with lots of adds and sky-high register pressure. On two-address machines, there i an added problem that the adds are so arranged that (at least, not counting reloads...) a two-instruction sequence is needed to do the additions. What is required is an optimization pass that finds all the uses of a sum of a base register and an offset in a basic block, and figures out where an auto-increment addressing mode can be profitably used, and also to reduce the register pressure and number of reg-reg copies. A patch against 4.0 20050218 is here: http://gcc.gnu.org/ml/gcc-patches/2005-02/msg01612.html -- Summary: autoincrement generation is poor Product: gcc Version: 2.95 Status: UNCONFIRMED Keywords: missed-optimization, patch Severity: enhancement Priority: P2 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: amylaar at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org OtherBugsDependingO 17652 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20211
next reply other threads:[~2005-02-25 16:20 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-02-25 22:08 amylaar at gcc dot gnu dot org [this message] 2005-02-26 1:13 ` [Bug rtl-optimization/20211] " pinskia at gcc dot gnu dot org 2005-02-26 1:24 ` giovannibajo at libero dot it 2005-02-27 4:49 ` hp at gcc dot gnu dot org 2005-02-28 20:49 ` joern dot rennecke at st dot com 2005-03-15 2:12 ` giovannibajo at libero dot it 2005-03-15 18:08 ` amylaar at gcc dot gnu dot org 2005-03-17 16:38 ` amylaar at gcc dot gnu dot org 2005-04-12 18:06 ` amylaar at gcc dot gnu dot org 2005-04-27 13:38 ` amylaar at gcc dot gnu dot org 2005-04-27 13:42 ` pinskia at gcc dot gnu dot org 2005-04-28 13:37 ` amylaar at gcc dot gnu dot org 2005-04-28 13:43 ` pinskia at gcc dot gnu dot org 2005-04-28 19:21 ` amylaar at gcc dot gnu dot org 2005-05-12 19:00 ` pinskia at gcc dot gnu dot org 2005-05-12 19:31 ` joern dot rennecke at st dot com 2005-05-17 19:20 ` amylaar at gcc dot gnu dot org 2005-09-19 16:52 ` cvs-commit at gcc dot gnu dot org 2005-09-19 16:54 ` cvs-commit at gcc dot gnu dot org 2005-09-19 17:30 ` amylaar at gcc dot gnu dot 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=20050225161912.20211.amylaar@gcc.gnu.org \ --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).