This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix disable-checking bootstrap problem on ppc-darwin
On Tue, 2004-08-24 at 20:22, Geoffrey Keating wrote:
>
> On Aug 24, 2004, at 5:12 PM, Richard Henderson wrote:
> >> this comparison to be true? Someone who knows more about what causes
> >> various VUSEs to be created might answer that better.
Could it be the 3 week delay I have inserted?? :-)
> >
> > I've sort of lost track of this thread. Is the argument for sorting
> > the VUSEs that we have hashes that are applied to them, and thus we
> > need to have the hashes come out the same?
>
> More generally, that we need to compare them and we desire (not need,
> as far as I can tell) the comparisons to be equal when the lists
> contain the same elements.
>
Right. Are the VUSEs for stmt A the same as they are for stmt B.
Im trying to figure out how often we care to compare stmt A and B where
the lists are in a different order. The only way they can be in a
different order, but still be the same 'expression' is if the same set
of variables are in the second stmt tree, but occur in a different
order. (If it doesnt make sense when you re-read it, I may have to
rewrite that. hahaha. even thats confusing....)
Ie,. when we see A + B, we stick all the vuses for A on the stmt, then
we stick the vuses for B. if B has any that are the same as in A, the
duplicates get removed while B is being processed. If we had B + A, then
B's VUSES are added, and any duplicates in A are removed as they are
added, and the result would be VUSES in a different order, but the same
equivilent VUSES.
The question is whether this is the only time it would matter, or is
there a more general case.
If this is the only one that matters, perhaps we could canonicalize
commutative expression such that the lower UID always comes first, or
something like that, when we generate GIMPLE form.
Or do we need something more general, or is it just so rare that it
really doesnt matter. There is a cost to sort, but its not too severe.
I'll see if I can come up with something even cheaper...
Andrew