projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not use get_nodes_block(). It is now available when global CSE is enabled
[libfirm]
/
ir
/
ir
/
irgwalk_blk.c
diff --git
a/ir/ir/irgwalk_blk.c
b/ir/ir/irgwalk_blk.c
index
9dec179
..
0a9f10f
100644
(file)
--- a/
ir/ir/irgwalk_blk.c
+++ b/
ir/ir/irgwalk_blk.c
@@
-19,6
+19,7
@@
#include "pset.h"
#include "irhooks.h"
#include "array.h"
#include "pset.h"
#include "irhooks.h"
#include "array.h"
+#include "hashptr.h"
/**
* Metadata for block walker
/**
* Metadata for block walker
@@
-50,14
+51,6
@@
static int addr_cmp(const void *elt, const void *key) {
return e1->block != e2->block;
}
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
*/
/**
* 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;
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;
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);
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 */
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);
obstack_init(&blks.obst);
blks.blk_map = new_pset(addr_cmp, 1);