(CodeGen code, int dump, int pass)
| 77 | if ((dump & pass) != 0) { |
| 78 | if ((dump & DUMP_PASS_NAME) != 0) { |
| 79 | System.err.println(switch (pass) { |
| 80 | case DUMP_AFTER_PARSE -> "After Parse:"; |
| 81 | case DUMP_AFTER_OPTO -> "After OPTO:"; |
| 82 | case DUMP_AFTER_TYPE_CHECK -> "After Type Check:"; |
| 83 | case DUMP_AFTER_LOOP_TREE -> "After Loop Tree:"; |
| 84 | case DUMP_AFTER_SELECT -> "After Code Selection:"; |
| 85 | case DUMP_AFTER_GCM -> "After GCM:"; |
| 86 | case DUMP_AFTER_LOCAL_SCHED -> "After Local Scheduling:"; |
| 87 | case DUMP_AFTER_REG_ALLOC -> "After Register Allocation:"; |
| 88 | case DUMP_AFTER_ENCODE -> "After Encoding:"; |
| 89 | case DUMP_FINAL -> "Final:"; |
| 90 | default -> throw Utils.TODO(); |
| 91 | }); |
| 92 | } |
| 93 | |
| 94 | System.err.println(IRPrinter.prettyPrint(code._stop, 9999)); |
| 95 | |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | static void print_compilation_times(CodeGen code) { |
| 100 | double t, total = 0; |
| 101 | |
| 102 | total += t = code._tParse / 1e3; |
| 103 | System.out.printf( "Parsing Time: %.3f sec%n", t); |
| 104 | total += t = code._tOpto / 1e3; |
| 105 | System.out.printf( "Optimization Time: %.3f sec%n", t); |
| 106 | total += t = code._tTypeCheck / 1e3; |
| 107 | System.out.printf( "Type Checking Time: %.3f sec%n", t); |
| 108 | total += t = code._tLoopTree / 1e3; |
| 109 | System.out.printf( "Loop Tree Time: %.3f sec%n", t); |
| 110 | total += t = code._tInsSel / 1e3; |
| 111 | System.out.printf( "Code Selection Time: %.3f sec%n", t); |
| 112 | total += t = code._tGCM / 1e3; |
| 113 | System.out.printf( "GCM Time: %.3f sec%n", t); |
| 114 | total += t = code._tLocal / 1e3; |
| 115 | System.out.printf( "Local Scheduling Time: %.3f sec%n", t); |
| 116 | total += t = code._tRegAlloc / 1e3; |
| 117 | System.out.printf( "Register Allocation Time: %.3f sec%n", t); |
| 118 | total += t = code._tEncode / 1e3; |
| 119 | System.out.printf( "Encoding Time: %.3f sec%n", t); |
| 120 | System.out.printf( "TOTAL COMPILATION TIME: %.3f sec%n", total); |
| 121 | } |
| 122 | |
| 123 | static String getInput() throws IOException { |
no test coverage detected