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/58459] [4.9 regression] Loop invariant is not hoisted out of loop after r202525.


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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
LIM does not move the invariant because it does not see that _7 in _7->key
is always dereferenced in the innermost loop.  This is because LIM computes
this property as a basic-block property, not as a reference property
(if all references are in the same form we could track that on a per reference
basis).

OTOH this again boils down to the fact that we do not have a code hoisting
pass.  PRE figures this out one level but fails to catch the third
occurance for some reason (just testing with -fno-tree-forwprop).

So, without major restructuring LIM won't do this and it certainly
wouldn't do it with partial rewritten _7 as we have it now with the
interesting loop still using the dereference form.


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