uint32_t opts_flags[1 + (COUNT_FLAGS / 32)];
uint32_t opts_optimization[1 + (COUNT_OPTIMIZATIONS / 32)];
+/* counter increased in ir.c */
+unsigned int optimization_count[COUNT_OPTIMIZATIONS];
+
uint32_t opts_O = 1;
const char *opts_output = "progs.dat";
int opts_standard = COMPILER_GMQCC;
bool opts_dump = false;
bool opts_forcecrc = false;
bool opts_pp_only = false;
-size_t opts_max_array_size = 1024;
+size_t opts_max_array_size = (1024 << 3);
uint16_t opts_forced_crc;
con_out("Possible optimizations:\n");
for (itr = 0; itr < COUNT_OPTIMIZATIONS; ++itr) {
util_strtononcmd(opts_opt_list[itr].name, buffer, sizeof(buffer));
- con_out(" -O%s\n", buffer);
+ con_out(" -O%-20s (-O%u)\n", buffer, opts_opt_oflag[itr]);
}
exit(0);
}
goto cleanup;
}
data = ftepp_get();
- if (!parser_compile_string_len(items[itr].filename, data, vec_size(data)-1)) {
- retval = 1;
- goto cleanup;
+ if (vec_size(data)) {
+ if (!parser_compile_string_len(items[itr].filename, data, vec_size(data))) {
+ retval = 1;
+ goto cleanup;
+ }
}
ftepp_flush();
}
/* stuff */
+ if (!opts_pp_only) {
+ for (itr = 0; itr < COUNT_OPTIMIZATIONS; ++itr) {
+ if (optimization_count[itr]) {
+ con_out("%s: %u\n", opts_opt_list[itr].name, (unsigned int)optimization_count[itr]);
+ }
+ }
+ }
+
cleanup:
util_debug("COM", "cleaning ...\n");
ftepp_finish();