[Bug tree-optimization/58459] [4.9 regression] Loop invariant is not hoisted out of loop after r202525.
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Sep 18 13:56:00 GMT 2013
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.
More information about the Gcc-bugs
mailing list