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 ipa/64827] LTO doesn't propogate/optimise initialised global variable value passed by reference


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-01-28
                 CC|                            |hubicka at gcc dot gnu.org,
                   |                            |jamborm at gcc dot gnu.org
          Component|lto                         |ipa
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
It is a non-trivial transformation ;)  First 'foo' has to be promoted to a
constant.  It's not written to - but it has its address taken, so to prove
that is non-trivial (and not done IIRC).  Then we have to apply IPA-CP.

I guess it's IPA references fault in some way.

Btw, on trunk we inline the function but fail to constant fold from the
initializer.


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