static int node_floats(ir_node *n) {
- return ((get_op_pinned(get_irn_op(n)) == op_pin_state_floats) &&
+ return ((get_irn_pinned(n) == op_pin_state_floats) &&
(get_irg_pinned(current_ir_graph) == op_pin_state_floats));
}
dump_node_mode(FILE *F, ir_node *n)
{
int bad = 0;
+ opcode iro = get_irn_opcode(n);
+
+ switch (iro) {
+ case iro_SymConst:
+ case iro_Sel:
+ case iro_End:
+ case iro_Return:
+ case iro_Free:
+ case iro_Sync:
+ case iro_Jmp:
+ break;
+ default: {
+ ir_mode *mode = get_irn_mode(n);
- switch (get_irn_opcode(n)) {
- case iro_Phi:
- case iro_Const:
- case iro_Id:
- case iro_Proj:
- case iro_Filter:
- case iro_Conv:
- case iro_Tuple:
- case iro_Add:
- case iro_Sub:
- case iro_Mul:
- case iro_And:
- case iro_Or:
- case iro_Eor:
- case iro_Shl:
- case iro_Shr:
- case iro_Abs:
- case iro_Cmp:
- case iro_Confirm:
- fprintf(F, "%s", get_mode_name_ex(get_irn_mode(n), &bad));
- break;
- default:
- ;
+ if (mode && mode != mode_BB && mode != mode_ANY && mode != mode_BAD &&
+ (mode != mode_T || iro == iro_Proj))
+ fprintf(F, "%s", get_mode_name_ex(mode, &bad));
+ }
}
+
return bad;
}
if (irg != get_const_code_irg())
fprintf (F, "irg: %s\n", get_ent_dump_name(get_irg_entity(irg)));
- if (get_op_pinned(get_irn_op(n)) == op_pin_state_floats &&
+ if (get_irn_pinned(n) == op_pin_state_floats &&
get_irg_pinned(get_irn_irg(n)) == op_pin_state_floats) {
fprintf(F, "node was pinned in ");
dump_node_opcode(F, get_nodes_block(n));
int i, n_cfgpreds = get_Block_cg_n_cfgpreds(sbl);
fprintf(F, "graph has %d interprocedural predecessors:\n", n_cfgpreds);
for (i = 0; i < n_cfgpreds; ++i) {
- ir_node *cfgpred = get_Block_cg_cfgpred(sbl, i);
- fprintf(F, " %d: Call %ld in graph %s\n", i, get_irn_node_nr(cfgpred),
- get_irg_dump_name(get_irn_irg(cfgpred)));
+ ir_node *cfgpred = get_Block_cg_cfgpred(sbl, i);
+ fprintf(F, " %d: Call %ld in graph %s\n", i, get_irn_node_nr(cfgpred),
+ get_irg_dump_name(get_irn_irg(cfgpred)));
}
}
} break;
if (Call_has_callees(n)) {
fprintf(F, "possible callees: \n");
for (i = 0; i < get_Call_n_callees(n); i++) {
- if (!get_Call_callee(n, i)) {
- fprintf(F, " %d external method\n", i);
- } else {
- fprintf(F, " %d: %s\n", i, get_ent_dump_name(get_Call_callee(n, i)));
- }
+ if (!get_Call_callee(n, i)) {
+ fprintf(F, " %d external method\n", i);
+ } else {
+ fprintf(F, " %d: %s\n", i, get_ent_dump_name(get_Call_callee(n, i)));
+ }
}
}
} break;
"colorentry 123: 255 220 220\n"
"colorentry 124: 255 240 240\n"
"colorentry 125: 255 250 250\n"
- );
+ );
fprintf (F, "\n"); /* a separator */
}
for (fl = i = 0; i < get_Block_n_cfgpreds(block); ++i) {
ir_node *pred = get_Block_cfgpred(block, i);
if (is_Bad(pred)) {
- if (! fl)
- fprintf(F, "Bad pred at pos: ");
- fprintf(F, "%d ", i);
- fl = 1;
+ if (! fl)
+ fprintf(F, "Bad pred at pos: ");
+ fprintf(F, "%d ", i);
+ fl = 1;
}
}
if (fl)
fprintf (F, "\""); /* closing quote of info */
if ((block == get_irg_start_block(get_irn_irg(block))) ||
- (block == get_irg_end_block(get_irn_irg(block))) )
+ (block == get_irg_end_block(get_irn_irg(block))) )
fprintf(F, " color:blue ");
else if (fl)
fprintf(F, " color:yellow ");
int max_loop_depth = irp->max_callgraph_loop_depth;
int max_overall_depth = weight_overall(max_rec_depth, max_loop_depth);
- int my_rec_color = compute_color(rec_depth, max_rec_depth);
- int my_loop_color = compute_color(loop_depth, max_loop_depth);
+ /* int my_rec_color = compute_color(rec_depth, max_rec_depth); */
+ /* int my_loop_color = compute_color(loop_depth, max_loop_depth); */
int my_overall_color = compute_color(overall_depth, max_overall_depth);;
return my_overall_color;
int bad = 0;
if (!loop_node_started) {
- /* Start a new node which contains all firm nodes of the current loop */
- fprintf (F, "node: { title: \"");
- PRINT_LOOPID(loop);
- fprintf (F, "-%d-nodes\" color: lightyellow label: \"", i);
- loop_node_started = 1;
- first = i;
+ /* Start a new node which contains all firm nodes of the current loop */
+ fprintf (F, "node: { title: \"");
+ PRINT_LOOPID(loop);
+ fprintf (F, "-%d-nodes\" color: lightyellow label: \"", i);
+ loop_node_started = 1;
+ first = i;
}
else
- fprintf(F, "\n");
+ fprintf(F, "\n");
bad |= dump_node_opcode(F, n);
bad |= dump_node_mode(F, n);
/* We are a loop node -> Collect firm graphs */
ir_graph *n = (ir_graph *)le.node;
if (!loop_node_started) {
- /* Start a new node which contains all firm nodes of the current loop */
- fprintf (F, "node: { title: \"");
- PRINT_LOOPID(loop);
- fprintf (F, "-%d-nodes\" color: lightyellow label: \"", i);
- loop_node_started = 1;
- first = i;
+ /* Start a new node which contains all firm nodes of the current loop */
+ fprintf (F, "node: { title: \"");
+ PRINT_LOOPID(loop);
+ fprintf (F, "-%d-nodes\" color: lightyellow label: \"", i);
+ loop_node_started = 1;
+ first = i;
}
else
- fprintf(F, "\n");
+ fprintf(F, "\n");
fprintf (F, " %s", get_irg_dump_name(n));
/* fprintf (F, " %s (depth %d)", get_irg_dump_name(n), n->callgraph_weighted_loop_depth); */
}