This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/64827] LTO doesn't propogate/optimise initialised global variable value passed by reference
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 28 Jan 2015 10:00:27 +0000
- Subject: [Bug ipa/64827] LTO doesn't propogate/optimise initialised global variable value passed by reference
- Auto-submitted: auto-generated
- References: <bug-64827-4 at http dot gcc dot gnu dot org/bugzilla/>
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.