]> granicus.if.org Git - php/commit
Improve SSA representation of FE_FETCH
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 30 Dec 2019 13:42:19 +0000 (14:42 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 17 Jan 2020 08:41:27 +0000 (09:41 +0100)
commit43719022eaf4de22baed1bb32de88944c24bb706
treea66ad614ab662c399390d18c29b6e3e8aafca3d4
parentbd1977282c14c1daa1718a82eb4b3bf79250ca16
Improve SSA representation of FE_FETCH

The op2 of FE_FETCH is only written if the loop edge is taken.
Fix up the SSA form to use the pre-assignment value if the exit
edge is taken.

This allows us to properly infer the type of the loop variable,
without letting the pre-loop type leak in.

Closes GH-5040.
ext/opcache/Optimizer/zend_inference.c
ext/opcache/Optimizer/zend_ssa.c
ext/opcache/Optimizer/zend_ssa.h