File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,9 @@ static inline zend_bool may_have_side_effects(
166
166
return 1 ;
167
167
}
168
168
if (!reorder_dtor_effects ) {
169
- if (opline -> op2_type != IS_CONST && (OP2_INFO () & MAY_HAVE_DTOR )) {
169
+ if (opline -> op2_type != IS_CONST
170
+ && (OP2_INFO () & MAY_HAVE_DTOR )
171
+ && ssa -> vars [ssa_op -> op2_use ].escape_state != ESCAPE_STATE_NO_ESCAPE ) {
170
172
/* DCE might shorten lifetime */
171
173
return 1 ;
172
174
}
@@ -215,7 +217,10 @@ static inline zend_bool may_have_side_effects(
215
217
}
216
218
if (!reorder_dtor_effects ) {
217
219
opline ++ ;
218
- if (opline -> op1_type != IS_CONST && (OP1_INFO () & MAY_HAVE_DTOR )) {
220
+ ssa_op ++ ;
221
+ if (opline -> op1_type != IS_CONST
222
+ && (OP1_INFO () & MAY_HAVE_DTOR )
223
+ && ssa -> vars [ssa_op -> op1_use ].escape_state != ESCAPE_STATE_NO_ESCAPE ) {
219
224
/* DCE might shorten lifetime */
220
225
return 1 ;
221
226
}
You can’t perform that action at this time.
0 commit comments