public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH][varmap] Add uid-bitmap and tree-bitmap maps
Date: Mon, 12 Nov 2007 16:30:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.0711121719470.4401@zhemvz.fhfr.qr> (raw)


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 *);

                 reply	other threads:[~2007-11-12 16:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0711121719470.4401@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).