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]

Re: [PATCH][RFC][4.4] Add may-alias oracle, make SCCVN use it


On 12/6/07 9:01 AM, Richard Guenther wrote:

I also think that some major pass re-shuffling
is needed at some point (it looks like it is never the right time
to do this, thouhg ;))

I would prefer to do ass reshuffling in a branch. Only after experimenting with a variety of different packages can we be certain of its goodness. I've been thinking that we may even want different pass orderings for the various -Ox.



+ /* Return true, if the two memory references REF1 and REF2 must alias. */
+ + bool
+ refs_must_alias_p (tree ref1, tree ref2)
+ {
+ return operand_equal_p (ref1, ref2, 0);
+ }
+ + /* Return true, if the memory reference REF is killed by the memory
+ definition DEF. */
+ + bool
+ ref_killed_by_def_p (tree ref, tree def)
+ {
+ /* While kill relationship is non-symmetric, must-alias relationship

s/kill/the kill/


+      is a conservative approximation to it.  */
+   return refs_must_alias_p (ref, def);
+ }

Hmm, I'm not sure about this one. What about partial kills? As-is now, must-alias and killed-by mean the same thing. What is your intent here? Do you want killed-by to also mean 'may kill' and/or 'partial kill'?


Otherwise, it seems to me that we could just only have may-alias and must-alias. And must alias ought to be more than operand_equal_p. We should also be checking points-to sets, for instance.

Other than that, I like the idea of the patch. This is OK for stage1. We could then start converting all the passes to use this harness. That will help us refine more each of these predicates.


Diego.



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