This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/58459] [4.9 regression] Loop invariant is not hoisted out of loop after r202525.
- 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, 18 Sep 2013 13:56:50 +0000
- Subject: [Bug tree-optimization/58459] [4.9 regression] Loop invariant is not hoisted out of loop after r202525.
- Auto-submitted: auto-generated
- References: <bug-58459-4 at http dot gcc dot gnu dot org/bugzilla/>
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.