com php-src: Remove CV limitation when determining value from type in SCCP: ext/opcache/Optimizer/sccp.c
| From: | Nikita Popov | Date: | Thu, 05 Dec 2019 14:26:16 +0000 |
| Subject: | com php-src: Remove CV limitation when determining value from type in SCCP: ext/opcache/Optimizer/sccp.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-109402@lists.php.net to get a copy of this message | ||
Commit: e0a8c7a8d0b312aae45ef46d27686771fc9297e9
Author: Nikita Popov <nikita.ppv@gmail.com> Thu, 5 Dec 2019 15:01:51 +0100
Parents: 9e403d65d8515422edf87949bcb60667cd737996
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e0a8c7a8d0b312aae45ef46d27686771fc9297e9
Log:
Remove CV limitation when determining value from type in SCCP
As far as I can determine, this is no longer a problem: We will
not try to remove the defining instructions (this is only done if
the value is known by SCCP itself) and we also only determine
non-refcounted values in this way, so it is not a problem if the
FREE is omitted.
Changed paths:
M ext/opcache/Optimizer/sccp.c
Diff:
diff --git a/ext/opcache/Optimizer/sccp.c b/ext/opcache/Optimizer/sccp.c
index 9c21f35d70e..0c62e1bd0d5 100644
--- a/ext/opcache/Optimizer/sccp.c
+++ b/ext/opcache/Optimizer/sccp.c
@@ -2164,11 +2164,6 @@ static zval *value_from_type_and_range(sccp_ctx *ctx, int var_num, zval *tmp)
{
zend_ssa *ssa = ctx->scdf.ssa;
zend_ssa_var_info *info = &ssa->var_info[var_num];
- if (ssa->vars[var_num].var >= ctx->scdf.op_array->last_var) {
- // TODO Non-CVs may cause issues with FREEs
- return NULL;
- }
-
if (info->type & MAY_BE_UNDEF) {
return NULL;
}