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: Fix disable-checking bootstrap problem on ppc-darwin



On Aug 24, 2004, at 5:12 PM, Richard Henderson wrote:


On Tue, Aug 24, 2004 at 05:45:57PM -0400, Andrew MacLeod wrote:
Is it strictly necessary for the VUSE operands to be sorted in order for
this comparison to be true? Someone who knows more about what causes
various VUSEs to be created might answer that better.

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.


If true, another solution is to ensure that for any commutative
operation that we're hashing, that we use a commutative hash.  So
instead of always

	for each operand (op) {
	  hash <<= n;
	  hash ^= munge(op);
	}

do

	if (commutative (operation)) {
	  hash <<= n;
	  hash ^= munge(operation);
	  for each operand (op) {
	    hash += munge(op);
	  }
	} else {
	  ...
	}

This works for the _hash function, but the _eq function still needs to somehow work out whether the two lists are really equivalent or just happen to have the same hash value.

Attachment: smime.p7s
Description: S/MIME cryptographic signature


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