1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 09:42:22 +01:00

Skip life range with LOAD and single use

This commit is contained in:
Dmitry Stogov
2020-04-24 16:14:58 +03:00
parent 9ddf9ac98e
commit 8a04d39d1c

View File

@@ -2094,6 +2094,12 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace
for (i = 0; i < ssa->vars_count; i++) {
if (start[i] >= 0 && end[i] >= 0) {
ZEND_ASSERT(j < count);
if ((flags[i] & ZREG_LOAD) &&
(flags[i] & ZREG_LAST_USE) &&
end[i] == ssa->vars[i].use_chain) {
/* skip life range with single use */
continue;
}
intervals[i] = &list[j];
list[j].ssa_var = i;
list[j].reg = ZREG_NONE;