Coverage Report

Created: 2026-06-02 06:40

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 © The PHP Group and Contributors.                          |
6
   +----------------------------------------------------------------------+
7
   | This source file is subject to the Modified BSD License that is      |
8
   | bundled with this package in the file LICENSE, and is available      |
9
   | through the World Wide Web at <https://www.php.net/license/>.        |
10
   |                                                                      |
11
   | SPDX-License-Identifier: BSD-3-Clause                                |
12
   +----------------------------------------------------------------------+
13
   | Authors: Dmitry Stogov <dmitry@php.net>                              |
14
   +----------------------------------------------------------------------+
15
*/
16
17
#ifndef ZEND_INFERENCE_H
18
#define ZEND_INFERENCE_H
19
20
#include "zend_optimizer.h"
21
#include "zend_ssa.h"
22
#include "zend_bitset.h"
23
24
/* Bitmask for type inference (zend_ssa_var_info.type) */
25
#include "zend_type_info.h"
26
27
#include <stdint.h>
28
29
0
#define MAY_BE_PACKED_GUARD         (1<<27) /* needs packed array guard */
30
0
#define MAY_BE_CLASS_GUARD          (1<<27) /* needs class guard */
31
535k
#define MAY_BE_GUARD                (1<<28) /* needs type guard */
32
33
#define MAY_HAVE_DTOR \
34
2.87k
  (MAY_BE_OBJECT|MAY_BE_RESOURCE \
35
2.87k
  |MAY_BE_ARRAY_OF_ARRAY|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_ARRAY_OF_RESOURCE)
36
37
#define DEFINE_SSA_OP_HAS_RANGE(opN) \
38
  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) \
39
133k
  { \
40
133k
    if (opline->opN##_type == IS_CONST) { \
41
19.5k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
19.5k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
114k
    } else { \
44
114k
      return (opline->opN##_type != IS_UNUSED && \
45
114k
            ssa->var_info && \
46
114k
            ssa_op->opN##_use >= 0 && \
47
114k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
114k
    } \
49
133k
    return 0; \
50
133k
  } \
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
39
72.5k
  { \
40
72.5k
    if (opline->opN##_type == IS_CONST) { \
41
7.69k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
7.69k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
64.8k
    } else { \
44
64.8k
      return (opline->opN##_type != IS_UNUSED && \
45
64.8k
            ssa->var_info && \
46
64.8k
            ssa_op->opN##_use >= 0 && \
47
64.8k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
64.8k
    } \
49
72.5k
    return 0; \
50
72.5k
  } \
zend_inference.c:_ssa_op2_has_range
Line
Count
Source
39
61.3k
  { \
40
61.3k
    if (opline->opN##_type == IS_CONST) { \
41
11.8k
      zval *zv = CRT_CONSTANT(opline->opN); \
42
11.8k
      return (Z_TYPE_P(zv) == IS_LONG); \
43
49.5k
    } else { \
44
49.5k
      return (opline->opN##_type != IS_UNUSED && \
45
49.5k
            ssa->var_info && \
46
49.5k
            ssa_op->opN##_use >= 0 && \
47
49.5k
          ssa->var_info[ssa_op->opN##_use].has_range); \
48
49.5k
    } \
49
61.3k
    return 0; \
50
61.3k
  } \
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
51
52
#define DEFINE_SSA_OP_MIN_RANGE(opN) \
53
  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) \
54
94.9k
  { \
55
94.9k
    if (opline->opN##_type == IS_CONST) { \
56
10.8k
      zval *zv = CRT_CONSTANT(opline->opN); \
57
10.8k
      if (Z_TYPE_P(zv) == IS_LONG) { \
58
10.8k
        return Z_LVAL_P(zv); \
59
10.8k
      } \
60
84.0k
    } else if (opline->opN##_type != IS_UNUSED && \
61
84.0k
        ssa->var_info && \
62
84.0k
        ssa_op->opN##_use >= 0 && \
63
84.0k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
64
84.0k
      return ssa->var_info[ssa_op->opN##_use].range.min; \
65
84.0k
    } \
66
94.9k
    return ZEND_LONG_MIN; \
67
94.9k
  } \
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
68
69
#define DEFINE_SSA_OP_MAX_RANGE(opN) \
70
  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) \
71
94.8k
  { \
72
94.8k
    if (opline->opN##_type == IS_CONST) { \
73
10.8k
      zval *zv = CRT_CONSTANT(opline->opN); \
74
10.8k
      if (Z_TYPE_P(zv) == IS_LONG) { \
75
10.8k
        return Z_LVAL_P(zv); \
76
10.8k
      } \
77
84.0k
    } else if (opline->opN##_type != IS_UNUSED && \
78
84.0k
        ssa->var_info && \
79
84.0k
        ssa_op->opN##_use >= 0 && \
80
84.0k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
81
84.0k
      return ssa->var_info[ssa_op->opN##_use].range.max; \
82
84.0k
    } \
83
94.8k
    return ZEND_LONG_MAX; \
84
94.8k
  } \
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
85
86
#define DEFINE_SSA_OP_RANGE_UNDERFLOW(opN) \
87
  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) \
88
89.0k
  { \
89
89.0k
    if (opline->opN##_type == IS_CONST) { \
90
8.64k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
8.64k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
8.64k
        return 0; \
93
8.64k
      } \
94
80.4k
    } else if (opline->opN##_type != IS_UNUSED && \
95
80.4k
        ssa->var_info && \
96
80.4k
        ssa_op->opN##_use >= 0 && \
97
80.4k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
80.4k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
80.4k
    } \
100
89.0k
    return 1; \
101
89.0k
  } \
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
88
54.9k
  { \
89
54.9k
    if (opline->opN##_type == IS_CONST) { \
90
2.73k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
2.73k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
2.73k
        return 0; \
93
2.73k
      } \
94
52.1k
    } else if (opline->opN##_type != IS_UNUSED && \
95
52.1k
        ssa->var_info && \
96
52.1k
        ssa_op->opN##_use >= 0 && \
97
52.1k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
52.1k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
52.1k
    } \
100
54.9k
    return 1; \
101
54.9k
  } \
zend_inference.c:_ssa_op2_range_underflow
Line
Count
Source
88
34.1k
  { \
89
34.1k
    if (opline->opN##_type == IS_CONST) { \
90
5.91k
      zval *zv = CRT_CONSTANT(opline->opN); \
91
5.91k
      if (Z_TYPE_P(zv) == IS_LONG) { \
92
5.91k
        return 0; \
93
5.91k
      } \
94
28.2k
    } else if (opline->opN##_type != IS_UNUSED && \
95
28.2k
        ssa->var_info && \
96
28.2k
        ssa_op->opN##_use >= 0 && \
97
28.2k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
98
28.2k
      return ssa->var_info[ssa_op->opN##_use].range.underflow; \
99
28.2k
    } \
100
34.1k
    return 1; \
101
34.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
102
103
#define DEFINE_SSA_OP_RANGE_OVERFLOW(opN) \
104
  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) \
105
76.3k
  { \
106
76.3k
    if (opline->opN##_type == IS_CONST) { \
107
8.40k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
8.40k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
8.40k
        return 0; \
110
8.40k
      } \
111
67.9k
    } else if (opline->opN##_type != IS_UNUSED && \
112
67.9k
        ssa->var_info && \
113
67.9k
        ssa_op->opN##_use >= 0 && \
114
67.9k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
67.9k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
67.9k
    } \
117
76.3k
    return 1; \
118
76.3k
  } \
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
105
43.0k
  { \
106
43.0k
    if (opline->opN##_type == IS_CONST) { \
107
2.53k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
2.53k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
2.53k
        return 0; \
110
2.53k
      } \
111
40.4k
    } else if (opline->opN##_type != IS_UNUSED && \
112
40.4k
        ssa->var_info && \
113
40.4k
        ssa_op->opN##_use >= 0 && \
114
40.4k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
40.4k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
40.4k
    } \
117
43.0k
    return 1; \
118
43.0k
  } \
zend_inference.c:_ssa_op2_range_overflow
Line
Count
Source
105
33.3k
  { \
106
33.3k
    if (opline->opN##_type == IS_CONST) { \
107
5.86k
      zval *zv = CRT_CONSTANT(opline->opN); \
108
5.86k
      if (Z_TYPE_P(zv) == IS_LONG) { \
109
5.86k
        return 0; \
110
5.86k
      } \
111
27.4k
    } else if (opline->opN##_type != IS_UNUSED && \
112
27.4k
        ssa->var_info && \
113
27.4k
        ssa_op->opN##_use >= 0 && \
114
27.4k
        ssa->var_info[ssa_op->opN##_use].has_range) { \
115
27.4k
      return ssa->var_info[ssa_op->opN##_use].range.overflow; \
116
27.4k
    } \
117
33.3k
    return 1; \
118
33.3k
  } \
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
119
120
DEFINE_SSA_OP_HAS_RANGE(op1)
121
48.3k
DEFINE_SSA_OP_MIN_RANGE(op1)
Unexecuted instantiation: zend_jit.c:_ssa_op1_min_range
Unexecuted instantiation: zend_inference.c:_ssa_op1_min_range
122
48.3k
DEFINE_SSA_OP_MAX_RANGE(op1)
Unexecuted instantiation: zend_jit.c:_ssa_op1_max_range
Unexecuted instantiation: zend_inference.c:_ssa_op1_max_range
123
DEFINE_SSA_OP_RANGE_UNDERFLOW(op1)
124
DEFINE_SSA_OP_RANGE_OVERFLOW(op1)
125
DEFINE_SSA_OP_HAS_RANGE(op2)
126
46.5k
DEFINE_SSA_OP_MIN_RANGE(op2)
Unexecuted instantiation: zend_jit.c:_ssa_op2_min_range
Unexecuted instantiation: zend_inference.c:_ssa_op2_min_range
127
46.5k
DEFINE_SSA_OP_MAX_RANGE(op2)
Unexecuted instantiation: zend_jit.c:_ssa_op2_max_range
Unexecuted instantiation: zend_inference.c:_ssa_op2_max_range
128
DEFINE_SSA_OP_RANGE_UNDERFLOW(op2)
129
DEFINE_SSA_OP_RANGE_OVERFLOW(op2)
130
131
113k
#define OP1_HAS_RANGE()       (_ssa_op1_has_range (op_array, ssa, opline, ssa_op))
132
48.3k
#define OP1_MIN_RANGE()       (_ssa_op1_min_range (op_array, ssa, opline, ssa_op))
133
48.3k
#define OP1_MAX_RANGE()       (_ssa_op1_max_range (op_array, ssa, opline, ssa_op))
134
82.6k
#define OP1_RANGE_UNDERFLOW() (_ssa_op1_range_underflow (op_array, ssa, opline, ssa_op))
135
70.1k
#define OP1_RANGE_OVERFLOW()  (_ssa_op1_range_overflow (op_array, ssa, opline, ssa_op))
136
61.6k
#define OP2_HAS_RANGE()       (_ssa_op2_has_range (op_array, ssa, opline, ssa_op))
137
46.5k
#define OP2_MIN_RANGE()       (_ssa_op2_min_range (op_array, ssa, opline, ssa_op))
138
46.5k
#define OP2_MAX_RANGE()       (_ssa_op2_max_range (op_array, ssa, opline, ssa_op))
139
61.3k
#define OP2_RANGE_UNDERFLOW() (_ssa_op2_range_underflow (op_array, ssa, opline, ssa_op))
140
52.7k
#define OP2_RANGE_OVERFLOW()  (_ssa_op2_range_overflow (op_array, ssa, opline, ssa_op))
141
142
BEGIN_EXTERN_C()
143
ZEND_API uint32_t ZEND_FASTCALL zend_array_type_info(const zval *zv);
144
END_EXTERN_C()
145
146
467k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
467k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
654
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
466k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
7.83k
    return zend_array_type_info(zv);
151
458k
  } else {
152
458k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
458k
    if (Z_REFCOUNTED_P(zv)) {
155
49.8k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
408k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
271k
      tmp |= MAY_BE_RCN;
158
271k
    }
159
458k
    return tmp;
160
458k
  }
161
467k
}
Unexecuted instantiation: zend_jit.c:_const_op_type
dce.c:_const_op_type
Line
Count
Source
146
32
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
32
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
0
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
32
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
30
    return zend_array_type_info(zv);
151
30
  } else {
152
2
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
2
    if (Z_REFCOUNTED_P(zv)) {
155
0
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
2
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
0
      tmp |= MAY_BE_RCN;
158
0
    }
159
2
    return tmp;
160
2
  }
161
32
}
dfa_pass.c:_const_op_type
Line
Count
Source
146
1.86k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
1.86k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
0
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
1.86k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
0
    return zend_array_type_info(zv);
151
1.86k
  } else {
152
1.86k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
1.86k
    if (Z_REFCOUNTED_P(zv)) {
155
266
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
1.59k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
1.59k
      tmp |= MAY_BE_RCN;
158
1.59k
    }
159
1.86k
    return tmp;
160
1.86k
  }
161
1.86k
}
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
146
164
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
164
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
0
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
164
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
0
    return zend_array_type_info(zv);
151
164
  } else {
152
164
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
164
    if (Z_REFCOUNTED_P(zv)) {
155
0
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
164
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
12
      tmp |= MAY_BE_RCN;
158
12
    }
159
164
    return tmp;
160
164
  }
161
164
}
zend_inference.c:_const_op_type
Line
Count
Source
146
220k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
220k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
478
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
220k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
3.65k
    return zend_array_type_info(zv);
151
216k
  } else {
152
216k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
216k
    if (Z_REFCOUNTED_P(zv)) {
155
25.4k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
191k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
121k
      tmp |= MAY_BE_RCN;
158
121k
    }
159
216k
    return tmp;
160
216k
  }
161
220k
}
zend_optimizer.c:_const_op_type
Line
Count
Source
146
244k
static zend_always_inline uint32_t _const_op_type(const zval *zv) {
147
244k
  if (Z_TYPE_P(zv) == IS_CONSTANT_AST) {
148
176
    return MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY;
149
244k
  } else if (Z_TYPE_P(zv) == IS_ARRAY) {
150
4.15k
    return zend_array_type_info(zv);
151
240k
  } else {
152
240k
    uint32_t tmp = (1 << Z_TYPE_P(zv));
153
154
240k
    if (Z_REFCOUNTED_P(zv)) {
155
24.1k
      tmp |= MAY_BE_RC1 | MAY_BE_RCN;
156
215k
    } else if (Z_TYPE_P(zv) == IS_STRING) {
157
148k
      tmp |= MAY_BE_RCN;
158
148k
    }
159
240k
    return tmp;
160
240k
  }
161
244k
}
Unexecuted instantiation: zend_ssa.c:_const_op_type
162
163
static zend_always_inline uint32_t get_ssa_var_info(const zend_ssa *ssa, int ssa_var_num)
164
2.04M
{
165
2.04M
  if (ssa->var_info && ssa_var_num >= 0) {
166
1.52M
    return ssa->var_info[ssa_var_num].type;
167
1.52M
  } else {
168
518k
    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;
169
518k
  }
170
2.04M
}
Unexecuted instantiation: zend_jit.c:get_ssa_var_info
dce.c:get_ssa_var_info
Line
Count
Source
164
3.63k
{
165
3.63k
  if (ssa->var_info && ssa_var_num >= 0) {
166
3.63k
    return ssa->var_info[ssa_var_num].type;
167
3.63k
  } else {
168
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;
169
0
  }
170
3.63k
}
dfa_pass.c:get_ssa_var_info
Line
Count
Source
164
19.8k
{
165
19.8k
  if (ssa->var_info && ssa_var_num >= 0) {
166
19.8k
    return ssa->var_info[ssa_var_num].type;
167
19.8k
  } else {
168
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;
169
0
  }
170
19.8k
}
escape_analysis.c:get_ssa_var_info
Line
Count
Source
164
5.54k
{
165
5.54k
  if (ssa->var_info && ssa_var_num >= 0) {
166
5.54k
    return ssa->var_info[ssa_var_num].type;
167
5.54k
  } else {
168
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;
169
0
  }
170
5.54k
}
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
164
36
{
165
36
  if (ssa->var_info && ssa_var_num >= 0) {
166
36
    return ssa->var_info[ssa_var_num].type;
167
36
  } else {
168
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;
169
0
  }
170
36
}
zend_inference.c:get_ssa_var_info
Line
Count
Source
164
900k
{
165
900k
  if (ssa->var_info && ssa_var_num >= 0) {
166
630k
    return ssa->var_info[ssa_var_num].type;
167
630k
  } else {
168
269k
    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;
169
269k
  }
170
900k
}
zend_optimizer.c:get_ssa_var_info
Line
Count
Source
164
1.11M
{
165
1.11M
  if (ssa->var_info && ssa_var_num >= 0) {
166
865k
    return ssa->var_info[ssa_var_num].type;
167
865k
  } else {
168
248k
    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;
169
248k
  }
170
1.11M
}
Unexecuted instantiation: zend_ssa.c:get_ssa_var_info
171
172
#define DEFINE_SSA_OP_INFO(opN) \
173
  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) \
174
2.02M
  {                                   \
175
2.02M
    if (opline->opN##_type == IS_CONST) {             \
176
467k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
1.55M
    } else { \
178
1.55M
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
1.55M
    } \
180
2.02M
  } \
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
174
985
  {                                   \
175
985
    if (opline->opN##_type == IS_CONST) {             \
176
32
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
953
    } else { \
178
953
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
953
    } \
180
985
  } \
dce.c:_ssa_op2_info
Line
Count
Source
174
2.68k
  {                                   \
175
2.68k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
2.68k
    } else { \
178
2.68k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
2.68k
    } \
180
2.68k
  } \
Unexecuted instantiation: dce.c:_ssa_result_info
dfa_pass.c:_ssa_op2_info
Line
Count
Source
174
5.06k
  {                                   \
175
5.06k
    if (opline->opN##_type == IS_CONST) {             \
176
1.12k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
3.94k
    } else { \
178
3.94k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
3.94k
    } \
180
5.06k
  } \
dfa_pass.c:_ssa_op1_info
Line
Count
Source
174
16.6k
  {                                   \
175
16.6k
    if (opline->opN##_type == IS_CONST) {             \
176
737
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
15.9k
    } else { \
178
15.9k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
15.9k
    } \
180
16.6k
  } \
Unexecuted instantiation: dfa_pass.c:_ssa_result_info
escape_analysis.c:_ssa_op1_info
Line
Count
Source
174
5.03k
  {                                   \
175
5.03k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
5.03k
    } else { \
178
5.03k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
5.03k
    } \
180
5.03k
  } \
escape_analysis.c:_ssa_op2_info
Line
Count
Source
174
502
  {                                   \
175
502
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
502
    } else { \
178
502
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
502
    } \
180
502
  } \
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
174
200
  {                                   \
175
200
    if (opline->opN##_type == IS_CONST) {             \
176
164
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
164
    } else { \
178
36
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
36
    } \
180
200
  } \
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
174
11.5k
  {                                   \
175
11.5k
    if (opline->opN##_type == IS_CONST) {             \
176
0
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
11.5k
    } else { \
178
11.5k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
11.5k
    } \
180
11.5k
  } \
zend_inference.c:_ssa_op1_info
Line
Count
Source
174
519k
  {                                   \
175
519k
    if (opline->opN##_type == IS_CONST) {             \
176
65.0k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
454k
    } else { \
178
454k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
454k
    } \
180
519k
  } \
zend_inference.c:_ssa_op2_info
Line
Count
Source
174
461k
  {                                   \
175
461k
    if (opline->opN##_type == IS_CONST) {             \
176
155k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
305k
    } else { \
178
305k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
305k
    } \
180
461k
  } \
zend_optimizer.c:_ssa_op1_info
Line
Count
Source
174
501k
  {                                   \
175
501k
    if (opline->opN##_type == IS_CONST) {             \
176
104k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
397k
    } else { \
178
397k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
397k
    } \
180
501k
  } \
zend_optimizer.c:_ssa_op2_info
Line
Count
Source
174
501k
  {                                   \
175
501k
    if (opline->opN##_type == IS_CONST) {             \
176
140k
      return _const_op_type(CRT_CONSTANT(opline->opN)); \
177
361k
    } else { \
178
361k
      return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_use : -1); \
179
361k
    } \
180
501k
  } \
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
181
182
#define DEFINE_SSA_OP_DEF_INFO(opN) \
183
  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) \
184
355k
  { \
185
355k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
355k
  } \
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
184
3.87k
  { \
185
3.87k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
3.87k
  } \
zend_optimizer.c:_ssa_result_def_info
Line
Count
Source
184
351k
  { \
185
351k
    return get_ssa_var_info(ssa, ssa->var_info ? ssa_op->opN##_def : -1); \
186
351k
  } \
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
187
188
189
DEFINE_SSA_OP_INFO(op1)
190
DEFINE_SSA_OP_INFO(op2)
191
DEFINE_SSA_OP_INFO(result)
192
DEFINE_SSA_OP_DEF_INFO(op1)
193
DEFINE_SSA_OP_DEF_INFO(op2)
194
DEFINE_SSA_OP_DEF_INFO(result)
195
196
1.01M
#define OP1_INFO()           (_ssa_op1_info(op_array, ssa, opline, ssa_op))
197
971k
#define OP2_INFO()           (_ssa_op2_info(op_array, ssa, opline, ssa_op))
198
25.5k
#define OP1_DATA_INFO()      (_ssa_op1_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
199
#define OP2_DATA_INFO()      (_ssa_op2_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
200
11.5k
#define RES_USE_INFO()       (_ssa_result_info(op_array, ssa, opline, ssa_op))
201
3.87k
#define OP1_DEF_INFO()       (_ssa_op1_def_info(op_array, ssa, opline, ssa_op))
202
#define OP2_DEF_INFO()       (_ssa_op2_def_info(op_array, ssa, opline, ssa_op))
203
#define OP1_DATA_DEF_INFO()  (_ssa_op1_def_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
204
#define OP2_DATA_DEF_INFO()  (_ssa_op2_def_info(op_array, ssa, (opline+1), ssa_op ? (ssa_op+1) : NULL))
205
351k
#define RES_INFO()           (_ssa_result_def_info(op_array, ssa, opline, ssa_op))
206
207
5.35k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
5.35k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
4.89k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
5.35k
}
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
207
2.22k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
2.22k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
1.76k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
2.22k
}
Unexecuted instantiation: zend_optimizer.c:zend_add_will_overflow
zend_ssa.c:zend_add_will_overflow
Line
Count
Source
207
3.13k
static zend_always_inline bool zend_add_will_overflow(zend_long a, zend_long b) {
208
3.13k
  return (b > 0 && a > ZEND_LONG_MAX - b)
209
3.13k
    || (b < 0 && a < ZEND_LONG_MIN - b);
210
3.13k
}
211
7.38k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
7.38k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
7.05k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
7.38k
}
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
211
5.90k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
5.90k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
5.57k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
5.90k
}
Unexecuted instantiation: zend_optimizer.c:zend_sub_will_overflow
zend_ssa.c:zend_sub_will_overflow
Line
Count
Source
211
1.48k
static zend_always_inline bool zend_sub_will_overflow(zend_long a, zend_long b) {
212
1.48k
  return (b > 0 && a < ZEND_LONG_MIN + b)
213
1.48k
    || (b < 0 && a > ZEND_LONG_MAX + b);
214
1.48k
}
215
216
BEGIN_EXTERN_C()
217
218
ZEND_API void zend_ssa_find_false_dependencies(const zend_op_array *op_array, const zend_ssa *ssa);
219
ZEND_API void zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa);
220
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);
221
222
ZEND_API uint32_t zend_array_element_type(uint32_t t1, uint8_t op_type, bool write, bool insert);
223
224
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);
225
226
ZEND_API uint32_t zend_fetch_arg_info_type(
227
  const zend_script *script, const zend_arg_info *arg_info, zend_class_entry **pce);
228
ZEND_API void zend_init_func_return_info(
229
  const zend_op_array *op_array, const zend_script *script, zend_ssa_var_info *ret);
230
uint32_t zend_get_return_info_from_signature_only(
231
    const zend_function *func, const zend_script *script,
232
    zend_class_entry **ce, bool *ce_is_instanceof, bool use_tentative_return_info);
233
234
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);
235
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);
236
237
ZEND_API zend_result zend_update_type_info(
238
  const zend_op_array *op_array, zend_ssa *ssa, const zend_script *script,
239
  const zend_op *opline, zend_ssa_op *ssa_op, const zend_op **ssa_opcodes,
240
  zend_long optimization_level);
241
242
END_EXTERN_C()
243
244
#endif /* ZEND_INFERENCE_H */