public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/37916]  New: [4.0 Regression] SSA names causing register pressure; unnecessarily many simultaneously "live" names.
@ 2008-10-25 20:07 hp at gcc dot gnu dot org
  2010-05-22 18:26 ` [Bug tree-optimization/37916] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu dot org
  0 siblings, 1 reply; 20+ messages in thread
From: hp at gcc dot gnu dot org @ 2008-10-25 20:07 UTC (permalink / raw)
  To: gcc-bugs

The attached preprocessed code in the first attachment is that of the adler32
function in zlib-1.1.3.  It comes highest in the profile of a zlib-based
performance regression test (the "example" program with no parameters).
I'm attaching the assembly code corresponding to gcc-3.2.1 for cris-axis-elf
with -O2 -march=v10 -fno-gcse -fno-reorder-blocks (the latter options being the
default in our local distribution) as well as the versions for the 4.3 branch
at 141344 and trunk at 141361 with the same options.  Note the larger stack
frames for the newer versions, as well as larger code that uses all available
registers and then some stack slots for the additive sums, where two registers
would have been enough.

While SSA generates lots of "names", IIUC they should have been collapsed
before outof-ssa.  It does to some extent, if the uses and the definitions are
close enough.  Looking at the tree-dumps, it's one pass that moved all the uses
away from the definitions, tree-reassoc, and no pass later that moved them
"back"; in particular TER (part of outof-ssa) did not.  Adding the option
-fno-tree-reassoc gets rid of most of the regression for this code (and
others).

Having TER changed to, or adding a subpass of outof-ssa, that moves each use
back to its definition, would seem like a better solution than shutting off
tree-reassoc.

This is also a good example of missed post-increment opportunities (all
versions); instead of increasing offsets from a base, there should have been a
single post-incremented register.


-- 
           Summary: [4.0 Regression] SSA names causing register pressure;
                    unnecessarily many simultaneously "live" names.
           Product: gcc
           Version: 4.3.3
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hp at gcc dot gnu dot org
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: cris-*-* and crisv32-*-*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37916


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

end of thread, other threads:[~2023-07-07 10:29 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-37916-4@http.gcc.gnu.org/bugzilla/>
2011-03-05  0:18 ` [Bug tree-optimization/37916] [4.3/4.4/4.5/4.6 Regression] SSA names causing register pressure; unnecessarily many simultaneously "live" names steven at gcc dot gnu.org
2011-03-11  1:31 ` hp at gcc dot gnu.org
2011-06-27 15:18 ` [Bug tree-optimization/37916] [4.3/4.4/4.5/4.6/4.7 " rguenth at gcc dot gnu.org
2012-03-13 15:37 ` [Bug tree-optimization/37916] [4.5/4.6/4.7/4.8 " jakub at gcc dot gnu.org
2012-07-02 13:55 ` [Bug tree-optimization/37916] [4.6/4.7/4.8 " rguenth at gcc dot gnu.org
2013-04-12 15:18 ` [Bug tree-optimization/37916] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
2014-06-12 13:49 ` [Bug tree-optimization/37916] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-12-19 13:44 ` [Bug tree-optimization/37916] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-06-23  8:28 ` [Bug tree-optimization/37916] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
2015-06-26 20:19 ` [Bug tree-optimization/37916] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:39 ` jakub at gcc dot gnu.org
2021-05-04 12:32 ` [Bug tree-optimization/37916] [8/9/10/11/12 " rguenth at gcc dot gnu.org
2021-05-14  9:45 ` [Bug tree-optimization/37916] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:04 ` rguenth at gcc dot gnu.org
2022-05-27  9:33 ` [Bug tree-optimization/37916] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:29 ` jakub at gcc dot gnu.org
2023-06-14  4:56 ` [Bug tree-optimization/37916] [10/11/12/13/14 " pinskia at gcc dot gnu.org
2023-06-14  5:11 ` pinskia at gcc dot gnu.org
2023-07-07 10:29 ` [Bug tree-optimization/37916] [11/12/13/14 " rguenth at gcc dot gnu.org
2008-10-25 20:07 [Bug tree-optimization/37916] New: [4.0 " hp at gcc dot gnu dot org
2010-05-22 18:26 ` [Bug tree-optimization/37916] [4.3/4.4/4.5/4.6 " rguenth 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).