Lines Matching refs:cfg
113 static int find_code_blocks(zend_op_array *op_array, zend_cfg *cfg, zend_optimizer_ctx *ctx) in find_code_blocks() argument
120 memset(cfg, 0, sizeof(zend_cfg)); in find_code_blocks()
121 blocks = cfg->blocks = zend_arena_calloc(&ctx->arena, op_array->last + 2, sizeof(zend_code_block)); in find_code_blocks()
187 cfg->try = zend_arena_calloc(&ctx->arena, op_array->last_try_catch, sizeof(zend_code_block *)); in find_code_blocks()
188 cfg->catch = zend_arena_calloc(&ctx->arena, op_array->last_try_catch, sizeof(zend_code_block *)); in find_code_blocks()
190 cfg->try[i] = &blocks[op_array->try_catch_array[i].try_op]; in find_code_blocks()
191 cfg->catch[i] = &blocks[op_array->try_catch_array[i].catch_op]; in find_code_blocks()
225 …cfg->loop_start = zend_arena_calloc(&ctx->arena, op_array->last_brk_cont, sizeof(zend_code_block *… in find_code_blocks()
226 …cfg->loop_cont = zend_arena_calloc(&ctx->arena, op_array->last_brk_cont, sizeof(zend_code_block *… in find_code_blocks()
227 …cfg->loop_brk = zend_arena_calloc(&ctx->arena, op_array->last_brk_cont, sizeof(zend_code_block *… in find_code_blocks()
238 cfg->loop_start[j] = &blocks[op_array->brk_cont_array[j].start]; in find_code_blocks()
239 cfg->loop_cont[j] = &blocks[op_array->brk_cont_array[j].cont]; in find_code_blocks()
240 cfg->loop_brk[j] = &blocks[op_array->brk_cont_array[j].brk]; in find_code_blocks()
507 static void zend_rebuild_access_path(zend_cfg *cfg, zend_op_array *op_array, int find_start, zend_o… in zend_rebuild_access_path() argument
509 zend_code_block *blocks = cfg->blocks; in zend_rebuild_access_path()
531 zend_access_path(cfg->loop_start[i], ctx); in zend_rebuild_access_path()
532 zend_access_path(cfg->loop_cont[i], ctx); in zend_rebuild_access_path()
533 zend_access_path(cfg->loop_brk[i], ctx); in zend_rebuild_access_path()
541 if (!cfg->catch[i]->access) { in zend_rebuild_access_path()
542 zend_access_path(cfg->catch[i], ctx); in zend_rebuild_access_path()
638 …ode_block *block, zend_op_array *op_array, zend_bitset used_ext, zend_cfg *cfg, zend_optimizer_ctx… in zend_optimize_block() argument
642 zend_op **Tsource = cfg->Tsource; in zend_optimize_block()
1181 static void assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array) in assemble_code_blocks() argument
1183 zend_code_block *blocks = cfg->blocks; in assemble_code_blocks()
1231 if (cfg->try[i]->access) { in assemble_code_blocks()
1232 op_array->try_catch_array[j].try_op = cfg->try[i]->start_opline - new_opcodes; in assemble_code_blocks()
1233 op_array->try_catch_array[j].catch_op = cfg->catch[i]->start_opline - new_opcodes; in assemble_code_blocks()
1244 op_array->brk_cont_array[i].start = cfg->loop_start[i]->start_opline - new_opcodes; in assemble_code_blocks()
1245 op_array->brk_cont_array[i].cont = cfg->loop_cont[i]->start_opline - new_opcodes; in assemble_code_blocks()
1246 op_array->brk_cont_array[i].brk = cfg->loop_brk[i]->start_opline - new_opcodes; in assemble_code_blocks()
1291 …_block *block, zend_op_array *op_array, zend_code_block *blocks, zend_cfg *cfg, zend_optimizer_ctx… in zend_jmp_optimization() argument
1452 zend_op **Tsource = cfg->Tsource; in zend_jmp_optimization()
1624 same_t = cfg->same_t; in zend_jmp_optimization()
1989 zend_cfg cfg; in optimize_cfg() local
2011 if (!find_code_blocks(op_array, &cfg, ctx)) { in optimize_cfg()
2016 zend_rebuild_access_path(&cfg, op_array, 0, ctx); in optimize_cfg()
2020 cfg.Tsource = zend_arena_calloc(&ctx->arena, op_array->last_var + op_array->T, sizeof(zend_op *)); in optimize_cfg()
2021 cfg.same_t = zend_arena_alloc(&ctx->arena, op_array->last_var + op_array->T); in optimize_cfg()
2025 cfg.Tsource = NULL; in optimize_cfg()
2026 cfg.same_t = NULL; in optimize_cfg()
2032 zend_t_usage(cfg.blocks, op_array, usage, ctx); in optimize_cfg()
2035 for (cur_block = cfg.blocks; cur_block; cur_block = cur_block->next) { in optimize_cfg()
2039 zend_optimize_block(cur_block, op_array, usage, &cfg, ctx); in optimize_cfg()
2043 for (cur_block = cfg.blocks; cur_block; cur_block = cur_block->next) { in optimize_cfg()
2047 zend_jmp_optimization(cur_block, op_array, cfg.blocks, &cfg, ctx); in optimize_cfg()
2051 zend_rebuild_access_path(&cfg, op_array, 1, ctx); in optimize_cfg()
2055 zend_t_usage(cfg.blocks, op_array, usage, ctx); in optimize_cfg()
2056 assemble_code_blocks(&cfg, op_array); in optimize_cfg()