X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Fcallgraph.c;h=8e6891e0af2d0d976f860065a7903eacc3055832;hb=58e533a640ff427362877a3d2f1a5142c96391e1;hp=a4df9f3fa137ac2cc2adefa86f64f901e0211a12;hpb=5ea9d0c93d64963b085ff10cde05f739e1c2606b;p=libfirm diff --git a/ir/ana/callgraph.c b/ir/ana/callgraph.c index a4df9f3fa..8e6891e0a 100644 --- a/ir/ana/callgraph.c +++ b/ir/ana/callgraph.c @@ -183,7 +183,7 @@ static void ana_Call(ir_node *n, void *env) { int i, n_callees; ir_graph *irg; - if (get_irn_op(n) != op_Call) return; + if (! is_Call(n)) return; irg = get_irn_irg(n); n_callees = get_Call_n_callees(n); @@ -192,10 +192,12 @@ static void ana_Call(ir_node *n, void *env) { ir_graph *callee = get_entity_irg(callee_e); if (callee) { - ana_entry buf = { callee, NULL, 0}; + ana_entry buf = { NULL, NULL, 0}; ana_entry *found; int depth; + buf.irg = 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. */