*参照元 [#o5e975a2] #backlinks *説明 [#h93bd402] -パス: [[gcc-8.3/gcc/cfgrtl.c]] -FIXME: これは何? --説明 **引数 [#yf2ffe12] -FILE *outf -- -const rtx_insn *rtx_first -- --[[gcc-8.3/gcc/rtx_insn]] -dump_flags_t flags -- --[[gcc-8.3/gcc/dump_flags_t]] **返り値 [#a937b3a6] -なし **参考 [#g548896f] *実装 [#qf352e1d] /* Like dump_function_to_file, but for RTL. Print out dataflow information for the start of each basic block. FLAGS are the TDF_* masks documented in dumpfile.h. */ void print_rtl_with_bb (FILE *outf, const rtx_insn *rtx_first, dump_flags_t flags) { const rtx_insn *tmp_rtx; if (rtx_first == 0) fprintf (outf, "(nil)\n"); - --[[gcc-8.3/gcc/rtx_insn]] else { enum bb_state { NOT_IN_BB, IN_ONE_BB, IN_MULTIPLE_BB }; int max_uid = get_max_uid (); basic_block *start = XCNEWVEC (basic_block, max_uid); basic_block *end = XCNEWVEC (basic_block, max_uid); enum bb_state *in_bb_p = XCNEWVEC (enum bb_state, max_uid); basic_block bb; - --[[gcc-8.3/gcc/get_max_uid()]] --[[gcc-8.3/gcc/XCNEWVEC()]] --[[gcc-8.3/gcc/basic_block]] /* After freeing the CFG, we still have BLOCK_FOR_INSN set on most insns, but the CFG is not maintained so the basic block info is not reliable. Therefore it's omitted from the dumps. */ if (! (cfun->curr_properties & PROP_cfg)) flags &= ~TDF_BLOCKS; if (df) df_dump_start (outf); - --[[gcc-8.3/gcc/df_dump_start()]] if (flags & TDF_BLOCKS) { FOR_EACH_BB_REVERSE_FN (bb, cfun) { rtx_insn *x; start[INSN_UID (BB_HEAD (bb))] = bb; end[INSN_UID (BB_END (bb))] = bb; for (x = BB_HEAD (bb); x != NULL_RTX; x = NEXT_INSN (x)) { enum bb_state state = IN_MULTIPLE_BB; if (in_bb_p[INSN_UID (x)] == NOT_IN_BB) state = IN_ONE_BB; in_bb_p[INSN_UID (x)] = state; if (x == BB_END (bb)) break; } } } - --[[gcc-8.3/gcc/FOR_EACH_BB_REVERSE_FN()]] --[[gcc-8.3/gcc/INSN_UID()]] --[[gcc-8.3/gcc/BB_HEAD()]] --[[gcc-8.3/gcc/NULL_RTX]] --[[gcc-8.3/gcc/NEXT_INSN()]] --[[gcc-8.3/gcc/IN_MULTIPLE_BB]] --[[gcc-8.3/gcc/IN_ONE_BB]] --[[gcc-8.3/gcc/BB_END()]] for (tmp_rtx = rtx_first; tmp_rtx != NULL; tmp_rtx = NEXT_INSN (tmp_rtx)) { if (flags & TDF_BLOCKS) { bb = start[INSN_UID (tmp_rtx)]; if (bb != NULL) { dump_bb_info (outf, bb, 0, dump_flags, true, false); if (df && (flags & TDF_DETAILS)) df_dump_top (bb, outf); } if (in_bb_p[INSN_UID (tmp_rtx)] == NOT_IN_BB && !NOTE_P (tmp_rtx) && !BARRIER_P (tmp_rtx)) fprintf (outf, ";; Insn is not within a basic block\n"); else if (in_bb_p[INSN_UID (tmp_rtx)] == IN_MULTIPLE_BB) fprintf (outf, ";; Insn is in multiple basic blocks\n"); } - --[[gcc-8.3/gcc/dump_bb_info()]] --[[gcc-8.3/gcc/df_dump_top()]] --[[gcc-8.3/gcc/INSN_UID()]] --[[gcc-8.3/gcc/NOTE_P()]] --[[gcc-8.3/gcc/BARRIER_P()]] if (flags & TDF_DETAILS) df_dump_insn_top (tmp_rtx, outf); if (! (flags & TDF_SLIM)) print_rtl_single (outf, tmp_rtx); else dump_insn_slim (outf, tmp_rtx); if (flags & TDF_DETAILS) df_dump_insn_bottom (tmp_rtx, outf); - --[[gcc-8.3/gcc/df_dump_insn_top()]] --[[gcc-8.3/gcc/print_rtl_single()]] --[[gcc-8.3/gcc/dump_insn_slim()]] --[[gcc-8.3/gcc/df_dump_insn_bottom()]] if (flags & TDF_BLOCKS) { bb = end[INSN_UID (tmp_rtx)]; if (bb != NULL) { dump_bb_info (outf, bb, 0, dump_flags, false, true); if (df && (flags & TDF_DETAILS)) df_dump_bottom (bb, outf); putc ('\n', outf); } } } - --[[gcc-8.3/gcc/dump_bb_info()]] --[[gcc-8.3/gcc/df_dump_bottom()]] free (start); free (end); free (in_bb_p); } } *コメント [#yb51a664]