From: Dmitry Stogov Date: Fri, 24 Apr 2020 13:14:58 +0000 (+0300) Subject: Skip life range with LOAD and single use X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a04d39d1cd11b002f02c8dea6498740949fb0cd;p=php Skip life range with LOAD and single use --- diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 4a687dd4c9..bbebebed12 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -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;