removed pn_Bound_M_except, Bound now have only one memory output
[libfirm] / ir / ir / irgwalk_blk.c
index 9dec179..0a9f10f 100644 (file)
@@ -19,6 +19,7 @@
 #include "pset.h"
 #include "irhooks.h"
 #include "array.h"
+#include "hashptr.h"
 
 /**
  * Metadata for block walker
@@ -50,14 +51,6 @@ static int addr_cmp(const void *elt, const void *key) {
   return e1->block != e2->block;
 }
 
-/**
- * calculates a hash value for an block address
- * Addresses are typically aligned at 32bit, so we ignore the lowest bits
- */
-static INLINE unsigned block_hash(const ir_node *node) {
-  return (unsigned)node >> 3;
-}
-
 /**
  * Returns the associates block_entry_t for an block
  */
@@ -67,7 +60,7 @@ static block_entry_t *block_find_entry(ir_node *block, blk_collect_data_t *ctx)
   block_entry_t *elem;
 
   key.block = block;
-  elem = pset_find(ctx->blk_map, &key, block_hash(block));
+  elem = pset_find(ctx->blk_map, &key, HASH_PTR(block));
   if (elem)
     return elem;
 
@@ -79,7 +72,7 @@ static block_entry_t *block_find_entry(ir_node *block, blk_collect_data_t *ctx)
   elem->cf_list    = NEW_ARR_F(ir_node *, 0);
   elem->entry_list = NEW_ARR_F(ir_node *, 0);
 
-  return pset_insert(ctx->blk_map, elem, block_hash(block));
+  return pset_insert(ctx->blk_map, elem, HASH_PTR(block));
 }
 
 /**
@@ -348,7 +341,7 @@ do_irg_walk_blk(ir_graph *irg, irg_walk_func *pre, irg_walk_func *post, void *en
   block_entry_t      *entry;
 
   /* switch off interprocedural view */
-  set_interprocedural_view(false);
+  set_interprocedural_view(0);
 
   obstack_init(&blks.obst);
   blks.blk_map  = new_pset(addr_cmp, 1);