This is the mail archive of the gcc-patches@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] |
On Thu, 2004-10-07 at 08:45, Daniel Berlin wrote:This patch changes DOM to fix the problem i mentioned yesterday, where it was replacing loop invariant variables with loop variant ones, due to not taking into account loop depth when deciding which way to record the equality. It now will look at the loop depths of the defining statements of the name when trying to determine which way to record the equality, and will choose the most loop-invariant name. This should actually also improve our loop optimizations as well, since they now have more invariants to work with. I haven't SPEC'd the change, however. Bootstrapped and regtested on i686-pc-linux-gnu.
Okay for mainline?
2004-10-07 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-dom.c (record_equality): Use loop depth to determine which way to record the equality as well. (loop_depth_of_name): New function.Is the loop depth information even available/kept-up-to-date during DOM? That was the blocking issue with a similar change to avoid unprofitable reassociations a while ago.
+}A couple empty lines would make this easier to read IMHO. At the least you need one after the local variable declarations.
Okeydokey.
And I think you wanted to use "<=" for the loop depth test itself in record_equality, not "<".
But most importantly, I think you need to verify that we actually have loop information at this point (maybe we do and I'm just not aware of it).
We do, like i said. It just may not be up to date. But it's still better than nothing.
Jeff
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |