[Bug lto/55118] New: Missed forward propagation of addresses
hubicka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Oct 29 15:27:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55118
Bug #: 55118
Summary: Missed forward propagation of addresses
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hubicka@gcc.gnu.org
When compiling tramp3d we end up overestimating function bodies because many of
array accesses and C++ casts are split into multiple instructions. I.e.:
_3 = &expr_1(D)->left_m;
freq:1.00 size: 1 time: 1
Will be eliminated by inlining
Accounting size:1.00, time:1.00 on new predicate:(op0 changed)
&& (not inlined)
_5 = LeafFunctor<Field<UniformRectilinearMesh<MeshTraits<3, double,
UniformRectilinearTag, CartesianTag, 3> >, double, BrickView>, EvalLeaf<3>
>::apply (_3, f_4(D));
freq:1.00 size: 4 time: 13
here left_m is IMO the first field of the structure so _3 will compile to no
code and should have size 1. But I do not see why it is not an function
argument.
Other common pattern is
_5 = &MEM[(const struct Domain *)&D.660972].D.123571.domain_m[i_4].D.118841;
freq:3.00 size: 1 time: 1
Accounting size:1.00, time:3.00 on predicate:(true)
_6 = &MEM[(struct Domain *)_1(D)].D.123571.domain_m[i_4].D.118841;
freq:3.00 size: 1 time: 1
Accounting size:1.00, time:3.00 on predicate:(true)
_7 = MEM[(const Element_t[2] &)_5];
freq:3.00 size: 1 time: 1
Accounting size:1.00, time:3.00 on predicate:(true)
where _5 can be folded into _7 computation.
it is easy to search for "= &" occurences in the dump and most of them are
foldable.
Honza
More information about the Gcc-bugs
mailing list