Skip to content

Commit 9e3b096

Browse files
committed
Tweak
1 parent 1321ef9 commit 9e3b096

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

Zend/Optimizer/dfa_pass.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,14 +1131,6 @@ void zend_dfa_optimize_op_array(zend_op_array *op_array, zend_optimizer_ctx *ctx
11311131
ssa_verify_integrity(op_array, ssa, "before dfa");
11321132
#endif
11331133

1134-
/* Optimization should not be done on main because of globals. */
1135-
if (op_array->function_name) {
1136-
zend_dfa_optimize_send_copies(op_array, ssa);
1137-
#if ZEND_DEBUG_DFA
1138-
ssa_verify_integrity(op_array, ssa, "after optimize send copies");
1139-
#endif
1140-
}
1141-
11421134
if (ZEND_OPTIMIZER_PASS_8 & ctx->optimization_level) {
11431135
if (sccp_optimize_op_array(ctx, op_array, ssa, call_map)) {
11441136
remove_nops = 1;
@@ -1179,6 +1171,14 @@ void zend_dfa_optimize_op_array(zend_op_array *op_array, zend_optimizer_ctx *ctx
11791171
#endif
11801172
}
11811173

1174+
/* Optimization should not be done on main because of globals. */
1175+
if (op_array->function_name) {
1176+
zend_dfa_optimize_send_copies(op_array, ssa);
1177+
#if ZEND_DEBUG_DFA
1178+
ssa_verify_integrity(op_array, ssa, "after optimize send copies");
1179+
#endif
1180+
}
1181+
11821182
for (v = op_array->last_var; v < ssa->vars_count; v++) {
11831183

11841184
op_1 = ssa->vars[v].definition;

Zend/Optimizer/sccp.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,12 +1053,7 @@ static void sccp_visit_instr(scdf_ctx *scdf, zend_op *opline, zend_ssa_op *ssa_o
10531053
SKIP_IF_TOP(op1);
10541054

10551055
if (opline->opcode == ZEND_SEND_VAR) {
1056-
if (opline->extended_value) {
1057-
ZVAL_UNDEF(&zv);
1058-
SET_RESULT(op1, &zv);
1059-
} else {
1060-
SET_RESULT(op1, op1);
1061-
}
1056+
SET_RESULT(op1, op1);
10621057
}
10631058

10641059
/* If the value of a SEND for an ICALL changes, we need to reconsider the

0 commit comments

Comments
 (0)