From: Michael Beck Date: Thu, 1 Sep 2005 09:17:25 +0000 (+0000) Subject: used HASHPTR() now X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=20f31cbacebc66ffc7847b769951d544358259ce;p=libfirm used HASHPTR() now [r6555] --- diff --git a/ir/ana/callgraph.c b/ir/ana/callgraph.c index 13b6f4437..8e14c5a35 100644 --- a/ir/ana/callgraph.c +++ b/ir/ana/callgraph.c @@ -31,6 +31,7 @@ #include "array.h" #include "pmap.h" +#include "hashptr.h" #include "irgwalk.h" @@ -174,9 +175,6 @@ double get_irg_caller_method_execution_frequency(ir_graph *irg, int pos) { /* --------------------- Compute the callgraph ------------------------ */ -/* Hash an address */ -#define HASH_ADDRESS(adr) (((unsigned)(adr)) >> 3) - /** * Walker called by compute_callgraph() */ @@ -197,8 +195,8 @@ static void ana_Call(ir_node *n, void *env) { ana_entry *found; int depth; - pset_insert((pset *)callee->callers, irg, (unsigned)irg >> 3); - found = pset_find((pset *)irg->callees, &buf, HASH_ADDRESS(callee)); + pset_insert((pset *)callee->callers, irg, HASH_PTR(irg)); + found = pset_find((pset *)irg->callees, &buf, HASH_PTR(callee)); if (found) { /* add Call node to list, compute new nesting. */ ir_node **arr = found->call_list; ARR_APP1(ir_node *, arr, n); @@ -209,7 +207,7 @@ static void ana_Call(ir_node *n, void *env) { found->call_list = NEW_ARR_F(ir_node *, 1); found->call_list[0] = n; found->max_depth = 0; - pset_insert((pset *)irg->callees, found, HASH_ADDRESS(callee)); + pset_insert((pset *)irg->callees, found, HASH_PTR(callee)); } depth = get_loop_depth(get_irn_loop(get_nodes_block(n))); found->max_depth = (depth > found->max_depth) ? depth : found->max_depth;