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 tree-optimization/81248] No ipa-sra optimization for small struct / class


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81248

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-06-29
          Component|c++                         |tree-optimization
            Summary|[AVR] No ipa-sra            |No ipa-sra optimization for
                   |optimization for small      |small struct / class
                   |struct / class              |
     Ever confirmed|0                           |1

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
So confirmed.  I suppose IPA-SRA simply doesn't consider passing the whole
aggregate but it would eventually pass the single member but somehow does not:

;; Function void f(const T&) [with T = A] (_Z1fI1AEvRKT_, funcdef_no=14,
decl_uid=5719, cgraph_uid=5, symbol_order=11)

Candidate (5720): x
! Disqualifying v - part of a volatile reference.
__attribute__((noinline))
void f(const T&) [with T = A] (const struct A & x)
{
  unsigned char _1;

  <bb 2> [0.00%]:
  _1 = x_3(D)->m1;
  v ={v} _1;
  return;

}

not sure why (the volatile looks unrelated here).  Confirmed also on x86_64.

Martin?

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