This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH][RFC][4.4] Add may-alias oracle, make SCCVN use it
- From: Diego Novillo <dnovillo at google dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 14 Dec 2007 08:16:23 -0500
- Subject: Re: [PATCH][RFC][4.4] Add may-alias oracle, make SCCVN use it
- References: <Pine.LNX.firstname.lastname@example.org>
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. */
+ 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. */
+ ref_killed_by_def_p (tree ref, tree def)
+ /* While kill relationship is non-symmetric, must-alias relationship
+ 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.