Lines Matching refs:sccp
2516 static void sccp_context_init(zend_optimizer_ctx *ctx, sccp_ctx *sccp, in sccp_context_init() argument
2519 sccp->call_map = call_map; in sccp_context_init()
2520 sccp->values = zend_arena_alloc(&ctx->arena, sizeof(zval) * ssa->vars_count); in sccp_context_init()
2522 MAKE_TOP(&sccp->top); in sccp_context_init()
2523 MAKE_BOT(&sccp->bot); in sccp_context_init()
2529 MAKE_BOT(&sccp->values[i]); in sccp_context_init()
2533 MAKE_BOT(&sccp->values[i]); in sccp_context_init()
2535 MAKE_TOP(&sccp->values[i]); in sccp_context_init()
2540 static void sccp_context_free(sccp_ctx *sccp) { in sccp_context_free() argument
2542 for (i = sccp->scdf.op_array->last_var; i < sccp->scdf.ssa->vars_count; ++i) { in sccp_context_free()
2543 zval_ptr_dtor_nogc(&sccp->values[i]); in sccp_context_free()
2549 sccp_ctx sccp; in sccp_optimize_op_array() local
2553 sccp_context_init(ctx, &sccp, ssa, op_array, call_map); in sccp_optimize_op_array()
2555 sccp.scdf.handlers.visit_instr = sccp_visit_instr; in sccp_optimize_op_array()
2556 sccp.scdf.handlers.visit_phi = sccp_visit_phi; in sccp_optimize_op_array()
2557 sccp.scdf.handlers.mark_feasible_successors = sccp_mark_feasible_successors; in sccp_optimize_op_array()
2559 scdf_init(ctx, &sccp.scdf, op_array, ssa); in sccp_optimize_op_array()
2560 scdf_solve(&sccp.scdf, "SCCP"); in sccp_optimize_op_array()
2566 zval *zv = &sccp.values[i]; in sccp_optimize_op_array()
2585 removed_ops += scdf_remove_unreachable_blocks(&sccp.scdf); in sccp_optimize_op_array()
2586 removed_ops += replace_constant_operands(&sccp); in sccp_optimize_op_array()
2588 sccp_context_free(&sccp); in sccp_optimize_op_array()