void IRBB::dump(Region * ru, bool dump_inner_region) { if (g_tfile == NULL) { return; } note("\n----- BB%d ------", BB_id(this)); if (getLabelList().get_elem_count() > 0) { note("\nLABEL:"); dumpBBLabel(getLabelList(), g_tfile); } //Attributes note("\nATTR:"); if (BB_is_entry(this)) { fprintf(g_tfile, "entry_bb "); } //if (BB_is_exit(this)) { // fprintf(g_tfile, "exit_bb "); //} if (BB_is_fallthrough(this)) { fprintf(g_tfile, "fall_through "); } if (BB_is_target(this)) { fprintf(g_tfile, "branch_target "); } //IR list note("\nSTMT NUM:%d", getNumOfIR()); g_indent += 3; TypeMgr * dm = ru->get_type_mgr(); for (IR * ir = BB_first_ir(this); ir != NULL; ir = BB_irlist(this).get_next()) { ASSERT0(ir->is_single() && ir->get_bb() == this); dump_ir(ir, dm, NULL, true, true, false, dump_inner_region); } g_indent -= 3; fprintf(g_tfile, "\n"); fflush(g_tfile); }
String getFlagsTypeString(const String& type, const Constant* constants) { return "Flags " + type + " ( " + getLabelList(constants) + " )"; }
String getEnumTypeString(const String& type, const Constant* constants) { return "Enum " + type + " ( " + getLabelList(constants) + " )"; }