#include "pset.h"
#include "irhooks.h"
#include "array.h"
+#include "hashptr.h"
/**
* Metadata for block walker
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
*/
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;
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));
}
/**
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);