int main(int ac, char** av) { instr_t* imem; int imem_size; int yyparse(); int yylex_destroy(); progname = av[0]; output = stdout; init_func(); init_instr(); init_stmt(); init_sim(); params(ac, av); if (yyin == NULL) { warning("no input file"); exit(0); } if (cfg_fp == NULL) yyparse(); fclose(yyin); yylex_destroy(); opt(); if (cfg_fp != NULL) exit(0); imem = stmt2instr(&imem_size); free_func(); deinit_symtab(); deinit_sym(); set_dmem_size(100000); set_imem(imem, imem_size); set_regs(32); run(); print_stats(); free_sim(); if (output != NULL) fclose(output); if (yyin != NULL) fclose(yyin); return 0; }
static bool init_block(nir_block *block, struct exec_list *worklist) { nir_foreach_instr(instr, block) init_instr(instr, worklist); nir_if *following_if = nir_block_get_following_if(block); if (following_if) { if (following_if->condition.is_ssa && !following_if->condition.ssa->parent_instr->pass_flags) worklist_push(worklist, following_if->condition.ssa->parent_instr); } return true; }