public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14455] New: Inner Altivec loop contains load/stores but not all registers being used
@ 2004-03-06  4:31 tjw at omnigroup dot com
  2004-03-06  4:32 ` [Bug c++/14455] " tjw at omnigroup dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: tjw at omnigroup dot com @ 2004-03-06  4:31 UTC (permalink / raw)
  To: gcc-bugs

Often in inner loops (no child functions called, big loop count), there will be several (many!) Altivec 
registers left unused.

The attached file demonstrates the problem, when built with tree-ssa with:

%PREFIX/bin/g++ -Winline -mdynamic-no-pic -fno-exceptions -O3 -maltivec -fstrict-aliasing 
-finline-functions -finline-limit=1000000000 -falign-loops=16 --param large-function-
growth=1000000 --param inline-unit-growth=1000 iterator_10.cpp -S -o /tmp/iterator_10.s

In my real world code, this is a big problem since I'm have code that does:

    - long computation for some answer
    - compute some address to ADD to the answer to (and the address is almost never in cache)
    - load from answer address
    - start on next loop
    - add answer and old answer and store

The problem is that the compiler totally blows the approach since it immediately stores the loaded 
old answer to the stack, causing a stall waiting for the load to complete (and thus preventing any 
asynchrony with the load and the computation in the next loop).

-- 
           Summary: Inner Altivec loop contains load/stores but not all
                    registers being used
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tjw at omnigroup dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin7.2.0
  GCC host triplet: powerpc-apple-darwin7.2.0
GCC target triplet: powerpc-apple-darwin7.2.0


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


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

end of thread, other threads:[~2005-09-20 17:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-06  4:31 [Bug c++/14455] New: Inner Altivec loop contains load/stores but not all registers being used tjw at omnigroup dot com
2004-03-06  4:32 ` [Bug c++/14455] " tjw at omnigroup dot com
2004-03-06  4:51 ` [Bug optimization/14455] " pinskia at gcc dot gnu dot org
2004-03-06  4:52 ` [Bug optimization/14455] Structs that cannot alias are SRA'd pinskia at gcc dot gnu dot org
2004-03-06  4:58 ` pinskia at gcc dot gnu dot org
2004-04-07  3:14 ` [Bug optimization/14455] Structs that cannot alias are not SRA'd tjw at omnigroup dot com
2004-05-24 16:02 ` [Bug tree-optimization/14455] " pinskia at gcc dot gnu dot org
2005-09-20 17:27 ` pinskia 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).