From: Michael Beck Date: Wed, 23 Jul 2008 16:18:33 +0000 (+0000) Subject: add dumping hook X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=7656a200a317700c7bc03bf6db40711e2c0d27ec;p=libfirm add dumping hook [r20631] --- diff --git a/ir/opt/combo.c b/ir/opt/combo.c index f60c48467..a8b5871be 100644 --- a/ir/opt/combo.c +++ b/ir/opt/combo.c @@ -1123,6 +1123,14 @@ static void set_compute_functions(void) { SET(End); } /* set_compute_functions */ +static int dump_partition_hook(FILE *F, ir_node *n, ir_node *local) { + ir_node *irn = local != NULL ? local : n; + node_t *node = get_irn_node(n); + + ir_fprintf(F, "info2 : \"partition %u type %+F\"\n", node->part->nr, node->type); + return 1; +} + void combo(ir_graph *irg) { environment_t env; ir_node *start_bl, *initial_X; @@ -1180,6 +1188,10 @@ void combo(ir_graph *irg) { dump_all_partitions(&env); + set_dump_node_vcgattr_hook(dump_partition_hook); + dump_ir_block_graph(irg, "-partition"); + + /* apply the result */ irg_walk_graph(irg, NULL, apply_result, &env);