From: Sebastian Buchwald Date: Mon, 16 Aug 2010 15:07:09 +0000 (+0000) Subject: Improved dump for RM. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=48aa7d4df41739507dec1350eadb0b459550455e;hp=4a2b4cd7491711ad5c1fd514689f101f9b6ab9f1;p=libfirm Improved dump for RM. [r27934] --- diff --git a/heuristical_co.c b/heuristical_co.c index f65db2cf8..0e4a47405 100644 --- a/heuristical_co.c +++ b/heuristical_co.c @@ -66,14 +66,6 @@ static void merge_into_RN_node(pbqp *pbqp, plist_t *rpeo) assert(node); assert(pbqp_node_get_degree(node) > 2); -#if KAPS_DUMP - if (pbqp->dump_file) { - char txt[100]; - sprintf(txt, "RN-Reduction of Node n%d", node->index); - dump_section(pbqp->dump_file, 2, txt); - pbqp_dump_graph(pbqp); - } -#endif /* Check whether we can merge a neighbor into the current node. */ apply_RM(pbqp, node); } @@ -92,6 +84,15 @@ static void apply_RN_co(pbqp *pbqp) if (node_is_reduced(node)) return; +#if KAPS_DUMP + if (pbqp->dump_file) { + char txt[100]; + sprintf(txt, "RN-Reduction of Node n%d", node->index); + dump_section(pbqp->dump_file, 2, txt); + pbqp_dump_graph(pbqp); + } +#endif + min_index = get_local_minimal_alternative(pbqp, node); #if KAPS_DUMP diff --git a/optimal.c b/optimal.c index 61f008298..9d6d2b619 100644 --- a/optimal.c +++ b/optimal.c @@ -348,6 +348,14 @@ static void merge_source_into_target(pbqp *pbqp, pbqp_edge *edge) pbqp->num_rm++; #endif +#if KAPS_DUMP + if (pbqp->dump_file) { + char txt[100]; + sprintf(txt, "Merging n%d into n%d", src_node->index, tgt_node->index); + dump_section(pbqp->dump_file, 3, txt); + } +#endif + /* Reconnect the source's edges with the target node. */ for (edge_index = 0; edge_index < edge_len; ++edge_index) { pbqp_edge *old_edge = src_node->edges[edge_index]; @@ -514,6 +522,14 @@ static void merge_target_into_source(pbqp *pbqp, pbqp_edge *edge) pbqp->num_rm++; #endif +#if KAPS_DUMP + if (pbqp->dump_file) { + char txt[100]; + sprintf(txt, "Merging n%d into n%d", tgt_node->index, src_node->index); + dump_section(pbqp->dump_file, 3, txt); + } +#endif + /* Reconnect the target's edges with the source node. */ for (edge_index = 0; edge_index < edge_len; ++edge_index) { pbqp_edge *old_edge = tgt_node->edges[edge_index];