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: [Bug middle-end/18574] [4.0 Regression] bootstrap comprison failed


Jeffrey A Law wrote:

I've been unable to reproduce the comparison failures.  However, as I
outlined in an earlier message, I have come up with a scenario in which
my patch might cause a comparison failure.


This fixes bootstrap compare failures on Darwin, thank you saving
me from the horrible debugging hell I was dreading when I saw
miscompares last night... :-)

Stan

This patch changes the hashing routine to use block indices rather
than hash on pointers.  That ought to stabilize the hash (and thus the
hash table traversals and SSA_NAME coalescing) in cases where it
was unstable before.

Since I've been unable to trigger the failure here, I can't say for
certain whether or not this patch fixes the bootstrap failures others
have seen.

FWIW, this has been bootstrapped and regression tested on
i686-pc-linux-gnu.




------------------------------------------------------------------------


	* tree-ssa-threadupdate.c (redirection_data_hash): Use the
	index of the destination block for the hash value rather than
	hashing a pointer.

Index: tree-ssa-threadupdate.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-threadupdate.c,v
retrieving revision 2.15
diff -c -p -r2.15 tree-ssa-threadupdate.c
*** tree-ssa-threadupdate.c 20 Nov 2004 12:48:13 -0000 2.15
--- tree-ssa-threadupdate.c 21 Nov 2004 15:00:33 -0000
*************** static hashval_t
*** 203,209 ****
redirection_data_hash (const void *p)
{
edge e = ((struct redirection_data *)p)->outgoing_edge;
! return htab_hash_pointer (e);
}
static int
--- 203,209 ----
redirection_data_hash (const void *p)
{
edge e = ((struct redirection_data *)p)->outgoing_edge;
! return e->dest->index;
}
static int




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