/* print the assembly language instructions to filename.s */ static void doProc(FILE *out, F_frame frame, T_stm body) { T_stmList stmList; AS_instrList iList; stmList = C_linearize(body); stmList = C_traceSchedule(C_basicBlocks(stmList)); // printStmList(stdout, stmList); print_graph_Stm_List(out, stmList); iList = F_codegen(frame, stmList); fprintf(stdout, "BEGIN %s\n", Temp_labelstring(frame->name)); AS_printInstrList (stdout, iList, Temp_layerMap(f_map,Temp_name())); fprintf(stdout, "END %s\n\n", Temp_labelstring(frame->name)); }
static void doProc(FILE *out, F_frame frame, T_stm body) { //printStm(body); AS_proc proc; T_stmList stmList; AS_instrList iList; stmList = C_linearize(body); stmList = C_traceSchedule(C_basicBlocks(stmList)); //printStmList(stdout, stmList); iList = codegen(frame, stmList); /* 9 */ G_graph g = FG_AssemFlowGraph(iList); //G_show(stdout, G_nodes(g), show_instr); //show_graph(g); struct L_graph lg = L_liveness(g); show_graph(lg.graph); fprintf(out, "BEGIN %s\n", Temp_labelstring(F_name(frame))); AS_printInstrList (out, iList, Temp_layerMap(F_tempMap,Temp_name())); fprintf(out, "END %s\n\n", Temp_labelstring(F_name(frame))); }