Coverage Report

Created: 2026-04-01 06:49

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/php-src/Zend/Optimizer/zend_inference.h
Line
Count
Source
1
/*
2
   +----------------------------------------------------------------------+
3
   | Zend Engine, e-SSA based Type & Range Inference                      |
4
   +----------------------------------------------------------------------+
5
   | Copyright (c) The PHP Group                                          |
6
   +----------------------------------------------------------------------+
7
   | This source file is subject to version 3.01 of the PHP license,      |
8
   | that is bundled with this package in the file LICENSE, and is        |
9
   | available through the world-wide-web at the following url:           |
10
   | https://www.php.net/license/3_01.txt                                 |
11
   | If you did not receive a copy of the PHP license and are unable to   |
12
   | obtain it through the world-wide-web, please send a note to          |
13
   | license@php.net so we can mail you a copy immediately.               |
14
   +----------------------------------------------------------------------+
15
   | Authors: Dmitry Stogov <dmitry@php.net>                              |
16
   +----------------------------------------------------------------------+
17
*/
18
19
#ifndef ZEND_INFERENCE_H
20
#define ZEND_INFERENCE_H
21
22
#include "zend_optimizer.h"
23
#include "zend_ssa.h"
24
#include "zend_bitset.h"
25
26
/* Bitmask for type inference (zend_ssa_var_info.type) */
27
#include "zend_type_info.h"
28
29
#include <stdint.h>
30
31
0
#define MAY_BE_PACKED_GUARD         (1<<27) /* needs packed array guard */
32
0
#define MAY_BE_CLASS_GUARD          (1<<27) /* needs class guard */
33
1.06M
#define MAY_BE_GUARD                (1<<28) /* needs type guard */
34
35
#define MAY_HAVE_DTOR \
36
5.33k
  (MAY_BE_OBJECT|MAY_BE_RESOURCE \
37
5.33k
  |MAY_BE_ARRAY_OF_ARRAY|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_ARRAY_OF_RESOURCE)
38
39
#define DEFINE_SSA_OP_HAS_RANGE(opN) \
40
  static zend_always_inline bool _ssa_##opN##_has_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
41
251k
  { \
42
251k
    if (opline->opN##_type == IS_CONST) { \
43
33.1k
      zval *zv = CRT_CONSTANT(opline->opN); \
44
33.1k
      return (Z_TYPE_P(zv) == IS_LONG); \
45
218k
    } else { \
46
218k
      return (opline->opN##_type != IS_UNUSED && \
47
218k
            ssa->var_info && \
48
218k
            ssa_op->opN##_use >= 0 && \
49
218k
          ssa->var_info[ssa_op->opN##_use].has_range); \
50
218k
    } \
51
251k
    return 0; \
52
251k
  } \
Unexecuted instantiation: zend_jit.c:_ssa_op1_has_range
Unexecuted instantiation: zend_jit.c:_ssa_op2_has_range
Unexecuted instantiation: dce.c:_ssa_op1_has_range
Unexecuted instantiation: dce.c:_ssa_op2_has_range
Unexecuted instantiation: dfa_pass.c:_ssa_op1_has_range
Unexecuted instantiation: dfa_pass.c:_ssa_op2_has_range
Unexecuted instantiation: escape_analysis.c:_ssa_op1_has_range
Unexecuted instantiation: escape_analysis.c:_ssa_op2_has_range
Unexecuted instantiation: sccp.c:_ssa_op1_has_range
Unexecuted instantiation: sccp.c:_ssa_op2_has_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_has_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_has_range
Unexecuted instantiation: zend_dump.c:_ssa_op1_has_range
Unexecuted instantiation: zend_dump.c:_ssa_op2_has_range
Unexecuted instantiation: zend_func_info.c:_ssa_op1_has_range
Unexecuted instantiation: zend_func_info.c:_ssa_op2_has_range
zend_inference.c:_ssa_op1_has_range
Line
Count
Source
41
142k
  { \
42
142k
    if (opline->opN##_type == IS_CONST) { \
43
13.7k
      zval *zv = CRT_CONSTANT(opline->opN); \
44
13.7k
      return (Z_TYPE_P(zv) == IS_LONG); \
45
128k
    } else { \
46
128k
      return (opline->opN##_type != IS_UNUSED && \
47
128k
            ssa->var_info && \
48
128k
            ssa_op->opN##_use >= 0 && \
49
128k
          ssa->var_info[ssa_op->opN##_use].has_range); \
50
128k
    } \
51
142k
    return 0; \
52
142k
  } \
zend_inference.c:_ssa_op2_has_range
Line
Count
Source
41
108k
  { \
42
108k
    if (opline->opN##_type == IS_CONST) { \
43
19.3k
      zval *zv = CRT_CONSTANT(opline->opN); \
44
19.3k
      return (Z_TYPE_P(zv) == IS_LONG); \
45
89.4k
    } else { \
46
89.4k
      return (opline->opN##_type != IS_UNUSED && \
47
89.4k
            ssa->var_info && \
48
89.4k
            ssa_op->opN##_use >= 0 && \
49
89.4k
          ssa->var_info[ssa_op->opN##_use].has_range); \
50
89.4k
    } \
51
108k
    return 0; \
52
108k
  } \
Unexecuted instantiation: zend_optimizer.c:_ssa_op1_has_range
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_has_range
Unexecuted instantiation: zend_ssa.c:_ssa_op1_has_range
Unexecuted instantiation: zend_ssa.c:_ssa_op2_has_range
53
54
#define DEFINE_SSA_OP_MIN_RANGE(opN) \
55
  static zend_always_inline zend_long _ssa_##opN##_min_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
56
185k
  { \
57
185k
    if (opline->opN##_type == IS_CONST) { \
58
17.5k
      zval *zv = CRT_CONSTANT(opline->opN); \
59
17.5k
      if (Z_TYPE_P(zv) == IS_LONG) { \
60
17.5k
        return Z_LVAL_P(zv); \
61
17.5k
      } \
62
167k
    } else if (opline->opN##_type != IS_UNUSED && \
63
167k
        ssa->var_info && \
64
167k
        ssa_op->opN##_use >= 0 && \
65
167k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
66
167k
      return ssa->var_info[ssa_op->opN##_use].range.min; \
67
167k
    } \
68
185k
    return ZEND_LONG_MIN; \
69
185k
  } \
Unexecuted instantiation: dce.c:_ssa_op1_min_range
Unexecuted instantiation: dce.c:_ssa_op2_min_range
Unexecuted instantiation: dfa_pass.c:_ssa_op1_min_range
Unexecuted instantiation: dfa_pass.c:_ssa_op2_min_range
Unexecuted instantiation: escape_analysis.c:_ssa_op1_min_range
Unexecuted instantiation: escape_analysis.c:_ssa_op2_min_range
Unexecuted instantiation: sccp.c:_ssa_op1_min_range
Unexecuted instantiation: sccp.c:_ssa_op2_min_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_min_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_min_range
Unexecuted instantiation: zend_dump.c:_ssa_op1_min_range
Unexecuted instantiation: zend_dump.c:_ssa_op2_min_range
Unexecuted instantiation: zend_func_info.c:_ssa_op1_min_range
Unexecuted instantiation: zend_func_info.c:_ssa_op2_min_range
Unexecuted instantiation: zend_optimizer.c:_ssa_op1_min_range
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_min_range
Unexecuted instantiation: zend_ssa.c:_ssa_op1_min_range
Unexecuted instantiation: zend_ssa.c:_ssa_op2_min_range
70
71
#define DEFINE_SSA_OP_MAX_RANGE(opN) \
72
  static zend_always_inline zend_long _ssa_##opN##_max_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
73
185k
  { \
74
185k
    if (opline->opN##_type == IS_CONST) { \
75
17.3k
      zval *zv = CRT_CONSTANT(opline->opN); \
76
17.3k
      if (Z_TYPE_P(zv) == IS_LONG) { \
77
17.3k
        return Z_LVAL_P(zv); \
78
17.3k
      } \
79
167k
    } else if (opline->opN##_type != IS_UNUSED && \
80
167k
        ssa->var_info && \
81
167k
        ssa_op->opN##_use >= 0 && \
82
167k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
83
167k
      return ssa->var_info[ssa_op->opN##_use].range.max; \
84
167k
    } \
85
185k
    return ZEND_LONG_MAX; \
86
185k
  } \
Unexecuted instantiation: dce.c:_ssa_op1_max_range
Unexecuted instantiation: dce.c:_ssa_op2_max_range
Unexecuted instantiation: dfa_pass.c:_ssa_op1_max_range
Unexecuted instantiation: dfa_pass.c:_ssa_op2_max_range
Unexecuted instantiation: escape_analysis.c:_ssa_op1_max_range
Unexecuted instantiation: escape_analysis.c:_ssa_op2_max_range
Unexecuted instantiation: sccp.c:_ssa_op1_max_range
Unexecuted instantiation: sccp.c:_ssa_op2_max_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_max_range
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_max_range
Unexecuted instantiation: zend_dump.c:_ssa_op1_max_range
Unexecuted instantiation: zend_dump.c:_ssa_op2_max_range
Unexecuted instantiation: zend_func_info.c:_ssa_op1_max_range
Unexecuted instantiation: zend_func_info.c:_ssa_op2_max_range
Unexecuted instantiation: zend_optimizer.c:_ssa_op1_max_range
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_max_range
Unexecuted instantiation: zend_ssa.c:_ssa_op1_max_range
Unexecuted instantiation: zend_ssa.c:_ssa_op2_max_range
87
88
#define DEFINE_SSA_OP_RANGE_UNDERFLOW(opN) \
89
  static zend_always_inline char _ssa_##opN##_range_underflow(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
90
170k
  { \
91
170k
    if (opline->opN##_type == IS_CONST) { \
92
13.1k
      zval *zv = CRT_CONSTANT(opline->opN); \
93
13.1k
      if (Z_TYPE_P(zv) == IS_LONG) { \
94
13.1k
        return 0; \
95
13.1k
      } \
96
157k
    } else if (opline->opN##_type != IS_UNUSED && \
97
157k
        ssa->var_info && \
98
157k
        ssa_op->opN##_use >= 0 && \
99
157k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
100
157k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
101
157k
    } \
102
170k
    return 1; \
103
170k
  } \
Unexecuted instantiation: zend_jit.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_jit.c:_ssa_op2_range_underflow
Unexecuted instantiation: dce.c:_ssa_op1_range_underflow
Unexecuted instantiation: dce.c:_ssa_op2_range_underflow
Unexecuted instantiation: dfa_pass.c:_ssa_op1_range_underflow
Unexecuted instantiation: dfa_pass.c:_ssa_op2_range_underflow
Unexecuted instantiation: escape_analysis.c:_ssa_op1_range_underflow
Unexecuted instantiation: escape_analysis.c:_ssa_op2_range_underflow
Unexecuted instantiation: sccp.c:_ssa_op1_range_underflow
Unexecuted instantiation: sccp.c:_ssa_op2_range_underflow
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_range_underflow
Unexecuted instantiation: zend_dump.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_dump.c:_ssa_op2_range_underflow
Unexecuted instantiation: zend_func_info.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_func_info.c:_ssa_op2_range_underflow
zend_inference.c:_ssa_op1_range_underflow
Line
Count
Source
90
111k
  { \
91
111k
    if (opline->opN##_type == IS_CONST) { \
92
4.32k
      zval *zv = CRT_CONSTANT(opline->opN); \
93
4.32k
      if (Z_TYPE_P(zv) == IS_LONG) { \
94
4.32k
        return 0; \
95
4.32k
      } \
96
107k
    } else if (opline->opN##_type != IS_UNUSED && \
97
107k
        ssa->var_info && \
98
107k
        ssa_op->opN##_use >= 0 && \
99
107k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
100
107k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
101
107k
    } \
102
111k
    return 1; \
103
111k
  } \
zend_inference.c:_ssa_op2_range_underflow
Line
Count
Source
90
59.1k
  { \
91
59.1k
    if (opline->opN##_type == IS_CONST) { \
92
8.85k
      zval *zv = CRT_CONSTANT(opline->opN); \
93
8.85k
      if (Z_TYPE_P(zv) == IS_LONG) { \
94
8.85k
        return 0; \
95
8.85k
      } \
96
50.2k
    } else if (opline->opN##_type != IS_UNUSED && \
97
50.2k
        ssa->var_info && \
98
50.2k
        ssa_op->opN##_use >= 0 && \
99
50.2k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
100
50.2k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
101
50.2k
    } \
102
59.1k
    return 1; \
103
59.1k
  } \
Unexecuted instantiation: zend_optimizer.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_range_underflow
Unexecuted instantiation: zend_ssa.c:_ssa_op1_range_underflow
Unexecuted instantiation: zend_ssa.c:_ssa_op2_range_underflow
104
105
#define DEFINE_SSA_OP_RANGE_OVERFLOW(opN) \
106
  static zend_always_inline char _ssa_##opN##_range_overflow(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
107
148k
  { \
108
148k
    if (opline->opN##_type == IS_CONST) { \
109
12.7k
      zval *zv = CRT_CONSTANT(opline->opN); \
110
12.7k
      if (Z_TYPE_P(zv) == IS_LONG) { \
111
12.7k
        return 0; \
112
12.7k
      } \
113
136k
    } else if (opline->opN##_type != IS_UNUSED && \
114
136k
        ssa->var_info && \
115
136k
        ssa_op->opN##_use >= 0 && \
116
136k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
117
136k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
118
136k
    } \
119
148k
    return 1; \
120
148k
  } \
Unexecuted instantiation: zend_jit.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_jit.c:_ssa_op2_range_overflow
Unexecuted instantiation: dce.c:_ssa_op1_range_overflow
Unexecuted instantiation: dce.c:_ssa_op2_range_overflow
Unexecuted instantiation: dfa_pass.c:_ssa_op1_range_overflow
Unexecuted instantiation: dfa_pass.c:_ssa_op2_range_overflow
Unexecuted instantiation: escape_analysis.c:_ssa_op1_range_overflow
Unexecuted instantiation: escape_analysis.c:_ssa_op2_range_overflow
Unexecuted instantiation: sccp.c:_ssa_op1_range_overflow
Unexecuted instantiation: sccp.c:_ssa_op2_range_overflow
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_range_overflow
Unexecuted instantiation: zend_dump.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_dump.c:_ssa_op2_range_overflow
Unexecuted instantiation: zend_func_info.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_func_info.c:_ssa_op2_range_overflow
zend_inference.c:_ssa_op1_range_overflow
Line
Count
Source
107
91.8k
  { \
108
91.8k
    if (opline->opN##_type == IS_CONST) { \
109
3.98k
      zval *zv = CRT_CONSTANT(opline->opN); \
110
3.98k
      if (Z_TYPE_P(zv) == IS_LONG) { \
111
3.98k
        return 0; \
112
3.98k
      } \
113
87.8k
    } else if (opline->opN##_type != IS_UNUSED && \
114
87.8k
        ssa->var_info && \
115
87.8k
        ssa_op->opN##_use >= 0 && \
116
87.8k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
117
87.8k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
118
87.8k
    } \
119
91.8k
    return 1; \
120
91.8k
  } \
zend_inference.c:_ssa_op2_range_overflow
Line
Count
Source
107
57.0k
  { \
108
57.0k
    if (opline->opN##_type == IS_CONST) { \
109
8.79k
      zval *zv = CRT_CONSTANT(opline->opN); \
110
8.79k
      if (Z_TYPE_P(zv) == IS_LONG) { \
111
8.79k
        return 0; \
112
8.79k
      } \
113
48.2k
    } else if (opline->opN##_type != IS_UNUSED && \
114
48.2k
        ssa->var_info && \
115
48.2k
        ssa_op->opN##_use >= 0 && \
116
48.2k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
117
48.2k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
118
48.2k
    } \
119
57.0k
    return 1; \
120
57.0k
  } \
Unexecuted instantiation: zend_optimizer.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_range_overflow
Unexecuted instantiation: zend_ssa.c:_ssa_op1_range_overflow
Unexecuted instantiation: zend_ssa.c:_ssa_op2_range_overflow
121
122
DEFINE_SSA_OP_HAS_RANGE(op1)
123
101k
DEFINE_SSA_OP_MIN_RANGE(op1)
Unexecuted instantiation: zend_jit.c:_ssa_op1_min_range
Unexecuted instantiation: zend_inference.c:_ssa_op1_min_range
124
101k
DEFINE_SSA_OP_MAX_RANGE(op1)
Unexecuted instantiation: zend_jit.c:_ssa_op1_max_range
Unexecuted instantiation: zend_inference.c:_ssa_op1_max_range
125
DEFINE_SSA_OP_RANGE_UNDERFLOW(op1)
126
DEFINE_SSA_OP_RANGE_OVERFLOW(op1)
127
DEFINE_SSA_OP_HAS_RANGE(op2)
128
84.0k
DEFINE_SSA_OP_MIN_RANGE(op2)
Unexecuted instantiation: zend_jit.c:_ssa_op2_min_range
Unexecuted instantiation: zend_inference.c:_ssa_op2_min_range
129
83.9k
DEFINE_SSA_OP_MAX_RANGE(op2)
Unexecuted instantiation: zend_jit.c:_ssa_op2_max_range
Unexecuted instantiation: zend_inference.c:_ssa_op2_max_range
130
DEFINE_SSA_OP_RANGE_UNDERFLOW(op2)
131
DEFINE_SSA_OP_RANGE_OVERFLOW(op2)
132
133
213k
#define OP1_HAS_RANGE()       (_ssa_op1_has_range (op_array, ssa, opline, ssa_op))
134
101k
#define OP1_MIN_RANGE()       (_ssa_op1_min_range (op_array, ssa, opline, ssa_op))
135
101k
#define OP1_MAX_RANGE()       (_ssa_op1_max_range (op_array, ssa, opline, ssa_op))
136
179k
#define OP1_RANGE_UNDERFLOW() (_ssa_op1_range_underflow (op_array, ssa, opline, ssa_op))
137
139k
#define OP1_RANGE_OVERFLOW()  (_ssa_op1_range_overflow (op_array, ssa, opline, ssa_op))
138
109k
#define OP2_HAS_RANGE()       (_ssa_op2_has_range (op_array, ssa, opline, ssa_op))
139
84.0k
#define OP2_MIN_RANGE()       (_ssa_op2_min_range (op_array, ssa, opline, ssa_op))
140
83.9k
#define OP2_MAX_RANGE()       (_ssa_op2_max_range (op_array, ssa, opline, ssa_op))
141
107k
#define OP2_RANGE_UNDERFLOW() (_ssa_op2_range_underflow (op_array, ssa, opline, ssa_op))
142
93.0k
#define OP2_RANGE_OVERFLOW()  (_ssa_op2_range_overflow (op_array, ssa, opline, ssa_op))
143
144
BEGIN_EXTERN_C()
145
ZEND_API uint32_t ZEND_FASTCALL zend_array_type_info(const zval *zv);
146
END_EXTERN_C()
147
148
917k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
917k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
1.07k
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
916k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
14.2k
    return zend_array_type_info(zv);
153
902k
  } else {
154
902k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
902k
    if (Z_REFCOUNTED_P(zv)) {
157
93.2k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
809k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
549k
      tmp |= MAY_BE_RCN;
160
549k
    }
161
902k
    return tmp;
162
902k
  }
163
917k
}
Unexecuted instantiation: zend_jit.c:_const_op_type
dce.c:_const_op_type
Line
Count
Source
148
56
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
56
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
0
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
56
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
56
    return zend_array_type_info(zv);
153
56
  } else {
154
0
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
0
    if (Z_REFCOUNTED_P(zv)) {
157
0
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
0
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
0
      tmp |= MAY_BE_RCN;
160
0
    }
161
0
    return tmp;
162
0
  }
163
56
}
dfa_pass.c:_const_op_type
Line
Count
Source
148
3.17k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
3.17k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
0
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
3.17k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
0
    return zend_array_type_info(zv);
153
3.17k
  } else {
154
3.17k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
3.17k
    if (Z_REFCOUNTED_P(zv)) {
157
547
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
2.62k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
2.62k
      tmp |= MAY_BE_RCN;
160
2.62k
    }
161
3.17k
    return tmp;
162
3.17k
  }
163
3.17k
}
Unexecuted instantiation: escape_analysis.c:_const_op_type
Unexecuted instantiation: sccp.c:_const_op_type
Unexecuted instantiation: zend_call_graph.c:_const_op_type
Unexecuted instantiation: zend_dump.c:_const_op_type
zend_func_info.c:_const_op_type
Line
Count
Source
148
407
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
407
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
0
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
407
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
0
    return zend_array_type_info(zv);
153
407
  } else {
154
407
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
407
    if (Z_REFCOUNTED_P(zv)) {
157
0
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
407
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
40
      tmp |= MAY_BE_RCN;
160
40
    }
161
407
    return tmp;
162
407
  }
163
407
}
zend_inference.c:_const_op_type
Line
Count
Source
148
437k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
437k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
668
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
436k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
6.66k
    return zend_array_type_info(zv);
153
430k
  } else {
154
430k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
430k
    if (Z_REFCOUNTED_P(zv)) {
157
49.2k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
381k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
249k
      tmp |= MAY_BE_RCN;
160
249k
    }
161
430k
    return tmp;
162
430k
  }
163
437k
}
zend_optimizer.c:_const_op_type
Line
Count
Source
148
476k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
149
476k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
150
402
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
151
476k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
152
7.56k
    return zend_array_type_info(zv);
153
468k
  } else {
154
468k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
155
156
468k
    if (Z_REFCOUNTED_P(zv)) {
157
43.4k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
158
425k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
159
297k
      tmp |= MAY_BE_RCN;
160
297k
    }
161
468k
    return tmp;
162
468k
  }
163
476k
}
Unexecuted instantiation: zend_ssa.c:_const_op_type
164
165
static zend_always_inline uint32_t get_ssa_var_info(const zend_ssa *ssa, int ssa_var_num)
166
4.03M
{
167
4.03M
  if (ssa->var_info && ssa_var_num >= 0) {
168
3.04M
    return ssa->var_info[ssa_var_num].type;
169
3.04M
  } else {
170
991k
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
171
991k
  }
172
4.03M
}
Unexecuted instantiation: zend_jit.c:get_ssa_var_info
dce.c:get_ssa_var_info
Line
Count
Source
166
7.31k
{
167
7.31k
  if (ssa->var_info && ssa_var_num >= 0) {
168
7.31k
    return ssa->var_info[ssa_var_num].type;
169
7.31k
  } else {
170
0
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
171
0
  }
172
7.31k
}
dfa_pass.c:get_ssa_var_info
Line
Count
Source
166
35.6k
{
167
35.6k
  if (ssa->var_info && ssa_var_num >= 0) {
168
35.6k
    return ssa->var_info[ssa_var_num].type;
169
35.6k
  } else {
170
0
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
171
0
  }
172
35.6k
}
escape_analysis.c:get_ssa_var_info
Line
Count
Source
166
9.15k
{
167
9.15k
  if (ssa->var_info && ssa_var_num >= 0) {
168
9.15k
    return ssa->var_info[ssa_var_num].type;
169
9.15k
  } else {
170
0
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
171
0
  }
172
9.15k
}
Unexecuted instantiation: sccp.c:get_ssa_var_info
Unexecuted instantiation: zend_call_graph.c:get_ssa_var_info
Unexecuted instantiation: zend_dump.c:get_ssa_var_info
zend_func_info.c:get_ssa_var_info
Line
Count
Source
166
59
{
167
59
  if (ssa->var_info && ssa_var_num >= 0) {
168
59
    return ssa->var_info[ssa_var_num].type;
169
59
  } else {
170
0
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
171
0
  }
172
59
}
zend_inference.c:get_ssa_var_info
Line
Count
Source
166
1.80M
{
167
1.80M
  if (ssa->var_info && ssa_var_num >= 0) {
168
1.28M
    return ssa->var_info[ssa_var_num].type;
169
1.28M
  } else {
170
511k
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
171
511k
  }
172
1.80M
}
zend_optimizer.c:get_ssa_var_info
Line
Count
Source
166
2.18M
{
167
2.18M
  if (ssa->var_info && ssa_var_num >= 0) {
168
1.70M
    return ssa->var_info[ssa_var_num].type;
169
1.70M
  } else {
170
479k
    return MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_INDIRECT | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF;
171
479k
  }
172
2.18M
}
Unexecuted instantiation: zend_ssa.c:get_ssa_var_info
173
174
#define DEFINE_SSA_OP_INFO(opN) \
175
  static zend_always_inline uint32_t _ssa_##opN##_info(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
176
3.95M
  {                                   \
177
3.95M
    if (opline->opN##_type == IS_CONST) {             \
178
917k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
3.03M
    } else { \
180
3.03M
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
3.03M
    } \
182
3.95M
  } \
Unexecuted instantiation: zend_jit.c:_ssa_op1_info
Unexecuted instantiation: zend_jit.c:_ssa_op2_info
Unexecuted instantiation: zend_jit.c:_ssa_result_info
dce.c:_ssa_op1_info
Line
Count
Source
176
2.37k
  {                                   \
177
2.37k
    if (opline->opN##_type == IS_CONST) {             \
178
56
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
2.31k
    } else { \
180
2.31k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
2.31k
    } \
182
2.37k
  } \
dce.c:_ssa_op2_info
Line
Count
Source
176
4.99k
  {                                   \
177
4.99k
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
4.99k
    } else { \
180
4.99k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
4.99k
    } \
182
4.99k
  } \
Unexecuted instantiation: dce.c:_ssa_result_info
dfa_pass.c:_ssa_op2_info
Line
Count
Source
176
10.0k
  {                                   \
177
10.0k
    if (opline->opN##_type == IS_CONST) {             \
178
1.78k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
8.23k
    } else { \
180
8.23k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
8.23k
    } \
182
10.0k
  } \
dfa_pass.c:_ssa_op1_info
Line
Count
Source
176
28.7k
  {                                   \
177
28.7k
    if (opline->opN##_type == IS_CONST) {             \
178
1.38k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
27.3k
    } else { \
180
27.3k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
27.3k
    } \
182
28.7k
  } \
Unexecuted instantiation: dfa_pass.c:_ssa_result_info
escape_analysis.c:_ssa_op1_info
Line
Count
Source
176
8.42k
  {                                   \
177
8.42k
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
8.42k
    } else { \
180
8.42k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
8.42k
    } \
182
8.42k
  } \
escape_analysis.c:_ssa_op2_info
Line
Count
Source
176
733
  {                                   \
177
733
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
733
    } else { \
180
733
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
733
    } \
182
733
  } \
Unexecuted instantiation: escape_analysis.c:_ssa_result_info
Unexecuted instantiation: sccp.c:_ssa_op1_info
Unexecuted instantiation: sccp.c:_ssa_op2_info
Unexecuted instantiation: sccp.c:_ssa_result_info
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_info
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_info
Unexecuted instantiation: zend_call_graph.c:_ssa_result_info
Unexecuted instantiation: zend_dump.c:_ssa_op1_info
Unexecuted instantiation: zend_dump.c:_ssa_op2_info
Unexecuted instantiation: zend_dump.c:_ssa_result_info
zend_func_info.c:_ssa_op1_info
Line
Count
Source
176
466
  {                                   \
177
466
    if (opline->opN##_type == IS_CONST) {             \
178
407
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
407
    } else { \
180
59
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
59
    } \
182
466
  } \
Unexecuted instantiation: zend_func_info.c:_ssa_op2_info
Unexecuted instantiation: zend_func_info.c:_ssa_result_info
zend_inference.c:_ssa_result_info
Line
Count
Source
176
35.5k
  {                                   \
177
35.5k
    if (opline->opN##_type == IS_CONST) {             \
178
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
35.5k
    } else { \
180
35.5k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
35.5k
    } \
182
35.5k
  } \
zend_inference.c:_ssa_op1_info
Line
Count
Source
176
1.00M
  {                                   \
177
1.00M
    if (opline->opN##_type == IS_CONST) {             \
178
128k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
878k
    } else { \
180
878k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
878k
    } \
182
1.00M
  } \
zend_inference.c:_ssa_op2_info
Line
Count
Source
176
906k
  {                                   \
177
906k
    if (opline->opN##_type == IS_CONST) {             \
178
309k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
597k
    } else { \
180
597k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
597k
    } \
182
906k
  } \
zend_optimizer.c:_ssa_op1_info
Line
Count
Source
176
972k
  {                                   \
177
972k
    if (opline->opN##_type == IS_CONST) {             \
178
203k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
769k
    } else { \
180
769k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
769k
    } \
182
972k
  } \
zend_optimizer.c:_ssa_op2_info
Line
Count
Source
176
972k
  {                                   \
177
972k
    if (opline->opN##_type == IS_CONST) {             \
178
273k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
179
699k
    } else { \
180
699k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
181
699k
    } \
182
972k
  } \
Unexecuted instantiation: zend_optimizer.c:_ssa_result_info
Unexecuted instantiation: zend_ssa.c:_ssa_op1_info
Unexecuted instantiation: zend_ssa.c:_ssa_op2_info
Unexecuted instantiation: zend_ssa.c:_ssa_result_info
183
184
#define DEFINE_SSA_OP_DEF_INFO(opN) \
185
  static zend_always_inline uint32_t _ssa_##opN##_def_info(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op *ssa_op) \
186
711k
  { \
187
711k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
188
711k
  } \
Unexecuted instantiation: zend_jit.c:_ssa_result_def_info
Unexecuted instantiation: zend_jit.c:_ssa_op1_def_info
Unexecuted instantiation: zend_jit.c:_ssa_op2_def_info
Unexecuted instantiation: dce.c:_ssa_op1_def_info
Unexecuted instantiation: dce.c:_ssa_op2_def_info
Unexecuted instantiation: dce.c:_ssa_result_def_info
Unexecuted instantiation: dfa_pass.c:_ssa_op1_def_info
Unexecuted instantiation: dfa_pass.c:_ssa_op2_def_info
Unexecuted instantiation: dfa_pass.c:_ssa_result_def_info
Unexecuted instantiation: escape_analysis.c:_ssa_op1_def_info
Unexecuted instantiation: escape_analysis.c:_ssa_op2_def_info
Unexecuted instantiation: escape_analysis.c:_ssa_result_def_info
Unexecuted instantiation: sccp.c:_ssa_op1_def_info
Unexecuted instantiation: sccp.c:_ssa_op2_def_info
Unexecuted instantiation: sccp.c:_ssa_result_def_info
Unexecuted instantiation: zend_call_graph.c:_ssa_op1_def_info
Unexecuted instantiation: zend_call_graph.c:_ssa_op2_def_info
Unexecuted instantiation: zend_call_graph.c:_ssa_result_def_info
Unexecuted instantiation: zend_dump.c:_ssa_op1_def_info
Unexecuted instantiation: zend_dump.c:_ssa_op2_def_info
Unexecuted instantiation: zend_dump.c:_ssa_result_def_info
Unexecuted instantiation: zend_func_info.c:_ssa_op1_def_info
Unexecuted instantiation: zend_func_info.c:_ssa_op2_def_info
Unexecuted instantiation: zend_func_info.c:_ssa_result_def_info
Unexecuted instantiation: zend_inference.c:_ssa_op1_def_info
Unexecuted instantiation: zend_inference.c:_ssa_op2_def_info
Unexecuted instantiation: zend_inference.c:_ssa_result_def_info
zend_optimizer.c:_ssa_op1_def_info
Line
Count
Source
186
6.27k
  { \
187
6.27k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
188
6.27k
  } \
zend_optimizer.c:_ssa_result_def_info
Line
Count
Source
186
705k
  { \
187
705k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
188
705k
  } \
Unexecuted instantiation: zend_optimizer.c:_ssa_op2_def_info
Unexecuted instantiation: zend_ssa.c:_ssa_op1_def_info
Unexecuted instantiation: zend_ssa.c:_ssa_op2_def_info
Unexecuted instantiation: zend_ssa.c:_ssa_result_def_info
189
190
191
DEFINE_SSA_OP_INFO(op1)
192
DEFINE_SSA_OP_INFO(op2)
193
DEFINE_SSA_OP_INFO(result)
194
DEFINE_SSA_OP_DEF_INFO(op1)
195
DEFINE_SSA_OP_DEF_INFO(op2)
196
DEFINE_SSA_OP_DEF_INFO(result)
197
198
1.98M
#define OP1_INFO()           (_ssa_op1_info(op_array, ssa, opline, ssa_op))
199
1.89M
#define OP2_INFO()           (_ssa_op2_info(op_array, ssa, opline, ssa_op))
200
35.7k
#define OP1_DATA_INFO()      (_ssa_op1_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
201
#define OP2_DATA_INFO()      (_ssa_op2_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
202
35.5k
#define RES_USE_INFO()       (_ssa_result_info(op_array, ssa, opline, ssa_op))
203
6.27k
#define OP1_DEF_INFO()       (_ssa_op1_def_info(op_array, ssa, opline, ssa_op))
204
#define OP2_DEF_INFO()       (_ssa_op2_def_info(op_array, ssa, opline, ssa_op))
205
#define OP1_DATA_DEF_INFO()  (_ssa_op1_def_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
206
#define OP2_DATA_DEF_INFO()  (_ssa_op2_def_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
207
705k
#define RES_INFO()           (_ssa_result_def_info(op_array, ssa, opline, ssa_op))
208
209
9.07k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
210
9.07k
  return (b > 0 && a > ZEND_LONG_MAX - b)
211
8.40k
    || (b < 0 && a < ZEND_LONG_MIN - b);
212
9.07k
}
Unexecuted instantiation: zend_jit.c:zend_add_will_overflow
Unexecuted instantiation: dce.c:zend_add_will_overflow
Unexecuted instantiation: dfa_pass.c:zend_add_will_overflow
Unexecuted instantiation: escape_analysis.c:zend_add_will_overflow
Unexecuted instantiation: sccp.c:zend_add_will_overflow
Unexecuted instantiation: zend_call_graph.c:zend_add_will_overflow
Unexecuted instantiation: zend_dump.c:zend_add_will_overflow
Unexecuted instantiation: zend_func_info.c:zend_add_will_overflow
zend_inference.c:zend_add_will_overflow
Line
Count
Source
209
3.14k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
210
3.14k
  return (b > 0 && a > ZEND_LONG_MAX - b)
211
2.47k
    || (b < 0 && a < ZEND_LONG_MIN - b);
212
3.14k
}
Unexecuted instantiation: zend_optimizer.c:zend_add_will_overflow
zend_ssa.c:zend_add_will_overflow
Line
Count
Source
209
5.93k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
210
5.93k
  return (b > 0 && a > ZEND_LONG_MAX - b)
211
5.93k
    || (b < 0 && a < ZEND_LONG_MIN - b);
212
5.93k
}
213
9.60k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
214
9.60k
  return (b > 0 && a < ZEND_LONG_MIN + b)
215
9.02k
    || (b < 0 && a > ZEND_LONG_MAX + b);
216
9.60k
}
Unexecuted instantiation: zend_jit.c:zend_sub_will_overflow
Unexecuted instantiation: dce.c:zend_sub_will_overflow
Unexecuted instantiation: dfa_pass.c:zend_sub_will_overflow
Unexecuted instantiation: escape_analysis.c:zend_sub_will_overflow
Unexecuted instantiation: sccp.c:zend_sub_will_overflow
Unexecuted instantiation: zend_call_graph.c:zend_sub_will_overflow
Unexecuted instantiation: zend_dump.c:zend_sub_will_overflow
Unexecuted instantiation: zend_func_info.c:zend_sub_will_overflow
zend_inference.c:zend_sub_will_overflow
Line
Count
Source
213
7.08k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
214
7.08k
  return (b > 0 && a < ZEND_LONG_MIN + b)
215
6.51k
    || (b < 0 && a > ZEND_LONG_MAX + b);
216
7.08k
}
Unexecuted instantiation: zend_optimizer.c:zend_sub_will_overflow
zend_ssa.c:zend_sub_will_overflow
Line
Count
Source
213
2.51k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
214
2.51k
  return (b > 0 && a < ZEND_LONG_MIN + b)
215
2.51k
    || (b < 0 && a > ZEND_LONG_MAX + b);
216
2.51k
}
217
218
BEGIN_EXTERN_C()
219
220
ZEND_API void zend_ssa_find_false_dependencies(const zend_op_array *op_array, const zend_ssa *ssa);
221
ZEND_API void zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa);
222
ZEND_API zend_result zend_ssa_inference(zend_arena **raena, const zend_op_array *op_array, const zend_script *script, zend_ssa *ssa, zend_long optimization_level);
223
224
ZEND_API uint32_t zend_array_element_type(uint32_t t1, uint8_t op_type, bool write, bool insert);
225
226
ZEND_API bool zend_inference_propagate_range(const zend_op_array *op_array, const zend_ssa *ssa, const zend_op *opline, const zend_ssa_op* ssa_op, int var, zend_ssa_range *tmp);
227
228
ZEND_API uint32_t zend_fetch_arg_info_type(
229
  const zend_script *script, const zend_arg_info *arg_info, zend_class_entry **pce);
230
ZEND_API void zend_init_func_return_info(
231
  const zend_op_array *op_array, const zend_script *script, zend_ssa_var_info *ret);
232
uint32_t zend_get_return_info_from_signature_only(
233
    const zend_function *func, const zend_script *script,
234
    zend_class_entry **ce, bool *ce_is_instanceof, bool use_tentative_return_info);
235
236
ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, const zend_ssa *ssa, uint32_t t1, uint32_t t2);
237
ZEND_API bool zend_may_throw(const zend_op *opline, const zend_ssa_op *ssa_op, const zend_op_array *op_array, const zend_ssa *ssa);
238
239
ZEND_API zend_result zend_update_type_info(
240
  const zend_op_array *op_array, zend_ssa *ssa, const zend_script *script,
241
  const zend_op *opline, zend_ssa_op *ssa_op, const zend_op **ssa_opcodes,
242
  zend_long optimization_level);
243
244
END_EXTERN_C()
245
246
#endif /* ZEND_INFERENCE_H */