[Bug optimization/14042] C++ abstraction penalty is high in simple cases

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Feb 6 08:00:00 GMT 2004


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-06 08:00 -------
Confirmed, it is not just altivec which has this problem, for most cases this is fixed on the tree-ssa but 
this is not for some  reason:
Cannot scalarize variable s1 because it must live in memory
Cannot scalarize variable s2 because it must live in memory
Cannot scalarize variable MT.1660 because it must live in memory

For some reason:
  this_26 = &s1;
  T.1644_27 = this_26->p1;
  T.1645_28 = this_26->p2;

is not translated before sra which causes it not to be optimized on the tree-ssa.

Here is the inner loop on the tree-ssa, it is worse than before:
L21:
        addi r10,r1,-144
        vaddfp v1,v9,v10
        lvx v0,r10,r0
        lvx v13,r10,r2
        vaddfp v12,v13,v0
        stvx v1,r10,r11
        vmaddfp v9,v1,v9,v10
        vsubfp v10,v1,v10
        vsubfp v11,v12,v0
        stvx v12,r10,r9
        vmaddfp v13,v12,v13,v0
        stvx v11,r10,r0
        stvx v13,r10,r2
        bdnz L21

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
          Component|c++                         |optimization
     Ever Confirmed|                            |1
      Known to fail|                            |tree-ssa
   Last reconfirmed|0000-00-00 00:00:00         |2004-02-06 08:00:55
               date|                            |
            Summary|C++ abstraction penalty is  |C++ abstraction penalty is
                   |high in simple Altivec cases|high in simple cases
   Target Milestone|---                         |tree-ssa


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



More information about the Gcc-bugs mailing list