public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14042] New: C++ abstraction penalty is high in simple cases
@ 2004-02-06  7:45 tjw at omnigroup dot com
  2004-02-06  7:46 ` [Bug c++/14042] " tjw at omnigroup dot com
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: tjw at omnigroup dot com @ 2004-02-06  7:45 UTC (permalink / raw)
  To: gcc-bugs

The attached test case shows nearly identical loops, the only difference being that one operates on 
two objects per loop and the other just one.

The iterate_ok() function generates a nice all-register loop like:

L16:
        vaddfp v1,v13,v0
        vmaddfp v13,v1,v13,v0
        vsubfp v0,v1,v0
        bdnz L16

The iterate_bad() function generates tons of load/store operations:

L41:
        lvx v0,r9,r0
        vaddfp v1,v9,v10
        lvx v13,r9,r2
        vaddfp v12,v13,v0
        vmaddfp v9,v1,v9,v10
        stvx v1,0,r11
        vsubfp v10,v1,v10
        vsubfp v11,v12,v0
        stvx v12,0,r9
        vmaddfp v13,v12,v13,v0
        stvx v11,r9,r0
        stvx v13,r9,r2
        bdnz L41


I don't know if this is specific to Altivec, I would assume it isn't, but my real program that is getting 
clobbered by this is Altivec-based.

-- 
           Summary: C++ abstraction penalty is high in simple cases
           Product: gcc
           Version: 3.4.0
            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=14042


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

end of thread, other threads:[~2004-06-02 18:57 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-06  7:45 [Bug c++/14042] New: C++ abstraction penalty is high in simple cases tjw at omnigroup dot com
2004-02-06  7:46 ` [Bug c++/14042] " tjw at omnigroup dot com
2004-02-06  7:50 ` [Bug c++/14042] C++ abstraction penalty is high in simple Altivec cases tjw at omnigroup dot com
2004-02-06  7:53 ` tjw at omnigroup dot com
2004-02-06  8:00 ` [Bug optimization/14042] C++ abstraction penalty is high in simple cases pinskia at gcc dot gnu dot org
2004-02-06 15:05 ` segher at kernel dot crashing dot org
2004-02-06 16:57 ` tjw at omnigroup dot com
2004-02-09 10:52 ` segher at kernel dot crashing dot org
2004-02-09 19:08 ` pinskia at gcc dot gnu dot org
2004-02-20  2:54 ` dberlin at gcc dot gnu dot org
2004-02-20  2:56 ` dberlin at gcc dot gnu dot org
2004-03-03  5:52 ` pinskia at gcc dot gnu dot org
2004-03-06  4:00 ` tjw at omnigroup dot com
2004-03-06  4:08 ` pinskia at gcc dot gnu dot org
2004-05-13 20:25 ` [Bug tree-optimization/14042] " pinskia at gcc dot gnu dot org
2004-05-16 23:46 ` tjw at omnigroup dot com
2004-05-16 23:59 ` pinskia at gcc dot gnu dot org
2004-05-17 13:30 ` pinskia at gcc dot gnu dot org
2004-05-27  8:02 ` pinskia at gcc dot gnu dot org
2004-06-02  4:41 ` pinskia at gcc dot gnu dot org
2004-06-02 18:57 ` cvs-commit at gcc dot gnu dot org
2004-06-02 18:57 ` 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).