False.  You get the equivalent of bootstrap comparison mismatches.
If we actually used tm during the bootstrap.

The simplest thing to do is to change the hash this table uses.
E.g. use the DECL_UID right from the start, rather than the pointer.

Woah! Can it be that easy? That's as easy as changing the hash, no conversion necessary.

OK for branch?

        * varasm.c (record_tm_clone_pair): Use DECL_UID as hash.
        (get_tm_clone_pair): Same.

Index: varasm.c
===================================================================
--- varasm.c    (revision 181067)
+++ varasm.c    (working copy)
@@ -5875,7 +5875,7 @@ record_tm_clone_pair (tree o, tree n)
     tm_clone_pairs = htab_create_ggc (32, tree_map_hash, tree_map_eq, 0);

   h = ggc_alloc_tree_map ();
-  h->hash = htab_hash_pointer (o);
+  h->hash = DECL_UID (o);
   h->base.from = o;
   h->to = n;

@@ -5892,7 +5892,7 @@ get_tm_clone_pair (tree o)
       struct tree_map *h, in;

       in.base.from = o;
-      in.hash = htab_hash_pointer (o);
+      in.hash = DECL_UID (o);
       h = (struct tree_map *) htab_find_with_hash (tm_clone_pairs,
                                                   &in, in.hash);
       if (h)

Reply via email to