/* Dump vinsn VI honoring flags. */ void dump_vinsn_1 (vinsn_t vi, int flags) { int all; /* flags == -1 also means dumping all. */ all = flags & 1; if (all) flags |= DUMP_VINSN_ALL; sel_print ("("); if (flags & DUMP_VINSN_INSN_RTX) dump_insn_rtx_1 (VINSN_INSN_RTX (vi), dump_insn_rtx_flags | all); if (flags & DUMP_VINSN_TYPE) sel_print ("type:%s;", GET_RTX_NAME (VINSN_TYPE (vi))); if (flags & DUMP_VINSN_COUNT) sel_print ("count:%d;", VINSN_COUNT (vi)); if (flags & DUMP_VINSN_COST) { int cost = vi->cost; if (cost != -1) sel_print ("cost:%d;", cost); } sel_print (")"); }
/* Dump insn INSN honoring FLAGS. */ void dump_insn_rtx_1 (rtx insn, int flags) { int all; /* flags == -1 also means dumping all. */ all = (flags & 1);; if (all) flags |= DUMP_INSN_RTX_ALL; sel_print ("("); if (flags & DUMP_INSN_RTX_UID) sel_print ("%d;", INSN_UID (insn)); if (flags & DUMP_INSN_RTX_PATTERN) { char buf[2048]; print_insn (buf, insn, 0); sel_print ("%s;", buf); } if (flags & DUMP_INSN_RTX_BBN) { basic_block bb = BLOCK_FOR_INSN (insn); sel_print ("bb:%d;", bb != NULL ? bb->index : -1); } sel_print (")"); }
/* Dumps av_set AV. */ void dump_av_set (av_set_t av) { av_set_iterator i; expr_t expr; if (!sched_dump_to_dot_p) sel_print ("{"); FOR_EACH_EXPR (expr, i, av) { dump_expr (expr); if (!sched_dump_to_dot_p) sel_print (" "); else sel_print ("\n"); }
/* Dump INSN to stderr. */ void debug_insn (insn_t insn) { switch_dump (stderr); dump_insn_1 (insn, debug_insn_flags); sel_print ("\n"); restore_dump (); }
/* Dump expression EXPR to stderr. */ void debug_expr (expr_t expr) { switch_dump (stderr); dump_expr_1 (expr, debug_expr_flags); sel_print ("\n"); restore_dump (); }
/* Dump vinsn VI to stderr. */ void debug_vinsn (vinsn_t vi) { switch_dump (stderr); dump_vinsn_1 (vi, debug_vinsn_flags); sel_print ("\n"); restore_dump (); }
/* Dump INSN to stderr. */ DEBUG_FUNCTION void debug_insn_rtx (rtx insn) { switch_dump (stderr); dump_insn_rtx_1 (insn, debug_insn_rtx_flags); sel_print ("\n"); restore_dump (); }
DEBUG_FUNCTION void debug_verbose (expr_def &ref) { switch_dump (stderr); dump_expr_1 (&ref, DUMP_EXPR_ALL); sel_print ("\n"); restore_dump (); }
DEBUG_FUNCTION void debug (expr_def &ref) { switch_dump (stderr); dump_expr_1 (&ref, 0); sel_print ("\n"); restore_dump (); }
DEBUG_FUNCTION void debug_verbose (vinsn_def &ref) { switch_dump (stderr); dump_vinsn_1 (&ref, debug_vinsn_flags); sel_print ("\n"); restore_dump (); }
/* Dump insn I honoring FLAGS. */ void dump_insn_1 (insn_t i, int flags) { int all; all = flags & 1; if (all) flags |= DUMP_INSN_ALL; if (!sched_dump_to_dot_p) sel_print ("("); if (flags & DUMP_INSN_EXPR) { dump_expr_1 (INSN_EXPR (i), dump_expr_flags | all); sel_print (";"); } else if (flags & DUMP_INSN_PATTERN) { dump_insn_rtx_1 (i, DUMP_INSN_RTX_PATTERN | all); sel_print (";"); } else if (flags & DUMP_INSN_UID) sel_print ("uid:%d;", INSN_UID (i)); if (flags & DUMP_INSN_SEQNO) sel_print ("seqno:%d;", INSN_SEQNO (i)); if (flags & DUMP_INSN_SCHED_CYCLE) { int cycle = INSN_SCHED_CYCLE (i); if (cycle != 0) sel_print ("cycle:%d;", cycle); } if (!sched_dump_to_dot_p) sel_print (")"); }
/* Dump EXPR honoring flags. */ void dump_expr_1 (expr_t expr, int flags) { int all; /* flags == -1 also means dumping all. */ all = flags & 1; if (all) flags |= DUMP_EXPR_ALL; sel_print ("["); if (flags & DUMP_EXPR_VINSN) dump_vinsn_1 (EXPR_VINSN (expr), dump_vinsn_flags | all); if (flags & DUMP_EXPR_SPEC) { int spec = EXPR_SPEC (expr); if (spec != 0) sel_print ("spec:%d;", spec); } if (flags & DUMP_EXPR_USEFULNESS) { int use = EXPR_USEFULNESS (expr); if (use != REG_BR_PROB_BASE) sel_print ("use:%d;", use); } if (flags & DUMP_EXPR_PRIORITY) sel_print ("prio:%d;", EXPR_PRIORITY (expr)); if (flags & DUMP_EXPR_SCHED_TIMES) { int times = EXPR_SCHED_TIMES (expr); if (times != 0) sel_print ("times:%d;", times); } if (flags & DUMP_EXPR_SPEC_DONE_DS) { ds_t spec_done_ds = EXPR_SPEC_DONE_DS (expr); if (spec_done_ds != 0) sel_print ("ds:%d;", spec_done_ds); } if (flags & DUMP_EXPR_ORIG_BB) { int orig_bb = EXPR_ORIG_BB_INDEX (expr); if (orig_bb != 0) sel_print ("orig_bb:%d;", orig_bb); } if (EXPR_TARGET_AVAILABLE (expr) < 1) sel_print ("target:%d;", EXPR_TARGET_AVAILABLE (expr)); sel_print ("]"); }