public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
[parent not found: <bug-20211-5394@http.gcc.gnu.org/bugzilla/>]
* [Bug rtl-optimization/20211] New: autoincrement generation is poor
@ 2005-02-25 22:08 amylaar at gcc dot gnu dot org
  2005-02-26  1:13 ` [Bug rtl-optimization/20211] " pinskia at gcc dot gnu dot org
                   ` (18 more replies)
  0 siblings, 19 replies; 29+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2005-02-25 22:08 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2015-09-21  8:15 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-20211-4@http.gcc.gnu.org/bugzilla/>
2013-12-24 22:55 ` [Bug rtl-optimization/20211] autoincrement generation is poor steven at gcc dot gnu.org
2015-09-21  8:15 ` olegendo at gcc dot gnu.org
     [not found] <bug-20211-5394@http.gcc.gnu.org/bugzilla/>
2005-11-02 21:50 ` amylaar at gcc dot gnu dot org
2006-11-15 20:11 ` amylaar at gcc dot gnu dot org
2006-11-30 20:05 ` amylaar at gcc dot gnu dot org
2006-12-17 14:47 ` steven at gcc dot gnu dot org
2007-06-18  2:03 ` pinskia at gcc dot gnu dot org
2007-09-17 20:06 ` rguenth at gcc dot gnu dot org
2008-05-23 23:14 ` hp at gcc dot gnu dot org
2010-02-22  6:05 ` amylaar at gcc dot gnu dot org
2005-02-25 22:08 [Bug rtl-optimization/20211] New: " amylaar at gcc dot gnu dot org
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

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).