This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/14042] New: C++ abstraction penalty is high in simple cases


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]