* [PATCH][varmap] Add uid-bitmap and tree-bitmap maps
@ 2007-11-12 16:30 Richard Guenther
0 siblings, 0 replies; only message in thread
From: Richard Guenther @ 2007-11-12 16:30 UTC (permalink / raw)
To: gcc-patches
Just to split generic (independed) changes from the rest.
Applied to the var-mappings-branch.
Richard.
2007-11-07 Richard Guenther <rguenther@suse.de>
* bitmap.h (struct uid_bitmap_map): Declare.
(uid_bitmap_map_eq): Likewise.
(uid_bitmap_map_hash): Likewise.
* bitmap.c (uid_bitmap_map_eq): New function.
(uid_bitmap_map_hash): Likewise.
* tree.h (struct tree_bitmap_map): Add.
(tree_bitmap_map_eq): Define.
(tree_bitmap_map_hash): Likewise.
Index: pointer_plus/gcc/bitmap.c
===================================================================
*** pointer_plus.orig/gcc/bitmap.c 2007-11-12 15:38:54.000000000 +0100
--- pointer_plus/gcc/bitmap.c 2007-11-12 16:28:41.000000000 +0100
*************** bitmap_hash (const_bitmap head)
*** 2003,2006 ****
--- 2003,2024 ----
return (hashval_t)hash;
}
+ /* Equality function for uid to bitmap map. */
+
+ int
+ uid_bitmap_map_eq (const void *va, const void *vb)
+ {
+ const struct uid_bitmap_map *a = (const struct uid_bitmap_map *) va;
+ const struct uid_bitmap_map *b = (const struct uid_bitmap_map *) vb;
+ return (a->uid == b->uid);
+ }
+
+ /* Hash value for uid to bitmap map. */
+
+ unsigned int
+ uid_bitmap_map_hash (const void *item)
+ {
+ return ((const struct uid_bitmap_map *)item)->uid;
+ }
+
#include "gt-bitmap.h"
Index: pointer_plus/gcc/bitmap.h
===================================================================
*** pointer_plus.orig/gcc/bitmap.h 2007-11-12 15:38:54.000000000 +0100
--- pointer_plus/gcc/bitmap.h 2007-11-12 16:28:41.000000000 +0100
*************** bmp_iter_and_compl (bitmap_iterator *bi,
*** 583,586 ****
--- 583,595 ----
bmp_iter_and_compl (&(ITER), &(BITNUM)); \
bmp_iter_next (&(ITER), &(BITNUM)))
+ struct uid_bitmap_map GTY(()) {
+ int uid;
+ struct bitmap_head_def *map;
+ };
+
+ int uid_bitmap_map_eq (const void *va, const void *vb);
+ unsigned int uid_bitmap_map_hash (const void *item);
+
+
#endif /* GCC_BITMAP_H */
Index: pointer_plus/gcc/tree.h
===================================================================
*** pointer_plus.orig/gcc/tree.h 2007-11-12 15:50:02.000000000 +0100
--- pointer_plus/gcc/tree.h 2007-11-12 16:28:41.000000000 +0100
*************** struct tree_int_map GTY(())
*** 5214,5219 ****
--- 5228,5243 ----
#define tree_int_map_hash tree_map_base_hash
#define tree_int_map_marked_p tree_map_base_marked_p
+ /* Map from a tree to a bitmap. */
+
+ struct tree_bitmap_map GTY(()) {
+ struct tree_map_base base;
+ struct bitmap_head_def *map;
+ };
+
+ #define tree_bitmap_map_eq tree_map_base_eq
+ #define tree_bitmap_map_hash tree_map_base_hash
+
/* Map from a DECL_UID to the decl tree. */
extern unsigned int uid_decl_map_hash (const void *);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-12 16:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-12 16:30 [PATCH][varmap] Add uid-bitmap and tree-bitmap maps Richard Guenther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).