} else {
assert(get_kind(get_SymConst_type(n)) == k_type);
assert(get_type_ident(get_SymConst_type(n)));
- fprintf (F, "SymC %s ", get_id_str(get_type_ident(get_SymConst_type(n))));
+ fprintf (F, "SymC %s ", get_type_name(get_SymConst_type(n)));
if (get_SymConst_kind(n) == type_tag)
fprintf (F, "tag");
else
case iro_Shr:
case iro_Abs:
case iro_Cmp:
- fprintf (F, "%s", get_id_str(get_mode_ident(get_irn_mode(n))));
+ fprintf (F, "%s", get_mode_name(get_irn_mode(n)));
break;
default:
;
switch (get_irn_opcode(n)) {
case iro_Start:
if (false && interprocedural_view) {
- fprintf (F, "%s", get_id_str(get_entity_ident(get_irg_ent(current_ir_graph))));
+ fprintf (F, "%s", get_entity_name(get_irg_ent(current_ir_graph)));
}
break;
case iro_Proj:
fprintf (F, "%s", get_entity_name(get_Sel_entity(n)));
} break;
case iro_Cast: {
- fprintf (F, "to %s", get_type_name(get_Cast_type(n)));
+ fprintf (F, "(%s)", get_type_name(get_Cast_type(n)));
} break;
default:
;
static INLINE
bool is_constlike_node(ir_node *n) {
ir_op *op = get_irn_op(n);
- return (op == op_Const || op == op_Bad || op == op_SymConst);
+ return (op == op_Const || op == op_Bad || op == op_SymConst || op == op_Unknown);
}
+/* outputs the predecessors of n, that are constants, local. I.e.,
+ generates a copy of the constant for each node called with. */
static void dump_const_node_local(ir_node *n, pmap *irgmap) {
int i;
if (!get_opt_dump_const_local()) return;
/* dump edges to our inputs */
static void
-dump_ir_data_edges(ir_node *n) {
+dump_ir_data_edges(ir_node *n, pmap *irgmap) {
int i, visited = get_irn_visited(n);
if ((get_irn_op(n) == op_End) && (!dump_keepalive))
fprintf (F, "edge: {sourcename: \"");
PRINT_NODEID(n);
fprintf (F, "\" targetname: ");
- if ((get_opt_dump_const_local()) && is_constlike_node(pred))
+ if ((get_opt_dump_const_local()) && is_constlike_node(pred) &&
+ !pred_in_wrong_graph(n, i, irgmap))
{
- PRINT_CONSTID(n,pred);
+ PRINT_CONSTID(n, pred);
}
else
{fprintf(F, "\""); PRINT_NODEID(pred); fprintf(F, "\"");
fprintf(F, "state: layout_fixed,\n");
}
if (get_type_mode(tp))
- fprintf(F, "mode: %s,\n", get_id_str(get_mode_ident(get_type_mode(tp))));
+ fprintf(F, "mode: %s,\n", get_mode_name(get_type_mode(tp)));
fprintf(F, "size: %dB,\n", get_type_size(tp));
}
{
fprintf (F, "node: {title: ");
PRINT_TYPEID(tp);
- fprintf (F, " label: \"%s %s\"", get_id_str(get_type_tpop_nameid(tp)), get_id_str(get_type_ident(tp)));
+ fprintf (F, " label: \"%s %s\"", get_type_tpop_name(tp), get_type_name(tp));
fprintf (F, " info1: \"");
print_type_info(tp);
fprintf (F, "\"");
PRINT_ENTID(ent); fprintf(F, "\"");
fprintf (F, DEFAULT_TYPE_ATTRIBUTE);
fprintf (F, "label: ");
- fprintf (F, "\"ent %s\" " ENTITY_NODE_ATTR , get_id_str(get_entity_ident(ent)));
+ fprintf (F, "\"ent %s\" " ENTITY_NODE_ATTR , get_entity_name(ent));
fprintf (F, "\n info1: \"\nid: "); PRINT_ENTID(ent);
fprintf (F, "\nallocation: ");
X(peculiarity_existent);
}
fprintf(F, "\nname: %s\nld_name: %s",
- get_id_str(get_entity_ident(ent)),
- get_id_str(get_entity_ld_ident(ent)));
+ get_entity_name(ent), get_entity_ld_name(ent));
fprintf(F, "\noffset: %d", get_entity_offset(ent));
if (is_method_type(get_entity_type(ent))) {
if (get_entity_irg(ent)) /* can be null */
dump_whole_node (ir_node *n, void* env) {
dump_node(n, NULL);
if (!node_floats(n)) dump_ir_block_edge(n);
- dump_ir_data_edges(n);
+ dump_ir_data_edges(n, NULL);
}
void
if (is_no_Block(n) && get_nodes_Block(n) == block && !node_floats(n)) {
dump_node(n, NULL);
- dump_ir_data_edges(n);
+ dump_ir_data_edges(n, NULL);
}
if (get_irn_op(n) == op_Bad)
Bad_dumped = 1;
fprintf(F, "\" status:clustered color:%s \n",
get_Block_matured (block) ? "yellow" : "red");
/* dump the blocks edges */
- dump_ir_data_edges(block);
+ dump_ir_data_edges(block, NULL);
/* dump the nodes that go into the block */
irg_walk(get_irg_end(irg), dump_ir_blocks_nodes, NULL, block);
dump_blockless_nodes (ir_node *n, void *env) {
if (is_no_Block(n) && get_irn_op(get_nodes_Block(n)) == op_Bad) {
dump_node(n, NULL);
- dump_ir_data_edges(n);
+ dump_ir_data_edges(n, NULL);
dump_ir_block_edge(n);
if (get_irn_op(n) == op_Bad) Bad_dumped = 1;
return;
}
if (node_floats(n)) {
dump_node(n, NULL);
- dump_ir_data_edges(n);
+ dump_ir_data_edges(n, NULL);
if (get_irn_op(n) == op_Bad) Bad_dumped = 1;
}
}
set_irn_link(node, NULL);
}
+
static void collect_blocks_floats_cg(ir_node * node, pmap * map) {
assert(node); assert(map);
if (is_Block(node)
ir_node *node;
pmap *irgmap = (pmap *)env;
assert(is_Block(block));
+
fprintf(F, "graph: { title: \"");
PRINT_NODEID(block);
fprintf(F, "\" label: \"");
- fprintf (F, "%s ", get_op_name(get_irn_op(block)));
-#ifdef DEBUG_libfirm
- fprintf (F, "%ld", get_irn_node_nr(block));
-#else
- fprintf (F, "%p", (void*) block);
-#endif
+ dump_node_opcode(block);
+ fprintf (F, " %ld", get_irn_node_nr(block));
+
if (exc_normal != get_Block_exc(block)) {
fprintf (F, " (%s)", exc_to_string (get_Block_exc(block)));
}
get_Block_matured(block) ? "yellow" : "red");
/* dump the blocks edges */
- dump_ir_data_edges(block);
+ dump_ir_data_edges(block, irgmap);
/* dump the nodes that go into the block */
for (node = get_irn_link(block); node; node = get_irn_link(node)) {
dump_node(node, irgmap);
- dump_ir_data_edges(node);
+ dump_ir_data_edges(node, irgmap);
}
/* Close the vcg information for the block */
- fprintf(F, "}\n\n");
+ fprintf(F, "}\n");
+ dump_const_node_local(block, irgmap);
+ fprintf(F, "\n");
}
static void d_cg_block_graph(ir_graph *irg, ir_node **arr, pmap *irgmap) {
int i;
- fprintf(F, "graph: { title: %p label: %s status:clustered color:white \n",
- (void*) irg, get_id_str(get_entity_ident(get_irg_ent(irg))));
+ fprintf(F, "graph: { title: \"%p\" label: \"%s\" status:clustered color:white \n",
+ (void*) irg, get_entity_name(get_irg_ent(irg)));
for (i = ARR_LEN(arr) - 1; i >= 0; --i) {
ir_node * node = arr[i];
if (is_Block(node)) {
- /* Dumps the block and all the nodes in the block , which are to
+ /* Dumps the block and all the nodes in the block, which are to
be found in Block->link. */
dump_cg_ir_block(node, irgmap);
} else {
/* Nodes that are not in a Block. */
dump_node(node, NULL);
- dump_ir_data_edges(node);
+ dump_ir_data_edges(node, NULL);
}
}
/* Close the vcg information for the irg */
for (i = ARR_LEN(arr) - 1; i >= 0; --i) {
ir_node * node = arr[i];
dump_node(node, map2);
- dump_ir_data_edges(node);
+ dump_ir_data_edges(node, NULL);
if (is_Block(node)) {
for (node = get_irn_link(node); node; node = get_irn_link(node)) {
dump_node(node, map2);
dump_ir_block_edge(node);
- dump_ir_data_edges(node);
+ dump_ir_data_edges(node, NULL);
}
}
}