/src/php-src/Zend/zend_bitset.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | +----------------------------------------------------------------------+ |
3 | | | Zend OPcache JIT | |
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_BITSET_H_ |
20 | | #define _ZEND_BITSET_H_ |
21 | | |
22 | | #include <stdint.h> |
23 | | #include <stdbool.h> |
24 | | #include <string.h> |
25 | | |
26 | | #include "zend_portability.h" |
27 | | #include "zend_long.h" |
28 | | |
29 | | typedef zend_ulong *zend_bitset; |
30 | | |
31 | 4.65M | #define ZEND_BITSET_ELM_SIZE sizeof(zend_ulong) |
32 | | |
33 | | #if SIZEOF_ZEND_LONG == 4 |
34 | | # define ZEND_BITSET_ELM_NUM(n) ((n) >> 5) |
35 | | # define ZEND_BITSET_BIT_NUM(n) ((zend_ulong)(n) & Z_UL(0x1f)) |
36 | | #elif SIZEOF_ZEND_LONG == 8 |
37 | 25.6M | # define ZEND_BITSET_ELM_NUM(n) ((n) >> 6) |
38 | 25.6M | # define ZEND_BITSET_BIT_NUM(n) ((zend_ulong)(n) & Z_UL(0x3f)) |
39 | | #else |
40 | | # define ZEND_BITSET_ELM_NUM(n) ((n) / (sizeof(zend_long) * 8)) |
41 | | # define ZEND_BITSET_BIT_NUM(n) ((n) % (sizeof(zend_long) * 8)) |
42 | | #endif |
43 | | |
44 | | #define ZEND_BITSET_ALLOCA(n, use_heap) \ |
45 | 324k | (zend_bitset)do_alloca((n) * ZEND_BITSET_ELM_SIZE, use_heap) |
46 | | |
47 | | /* Number of trailing zero bits (0x01 -> 0; 0x40 -> 6; 0x00 -> LEN) */ |
48 | | ZEND_ATTRIBUTE_CONST static zend_always_inline int zend_ulong_ntz(zend_ulong num) |
49 | 1.46M | { |
50 | 1.46M | #if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) \ |
51 | 1.46M | && SIZEOF_ZEND_LONG == SIZEOF_LONG && defined(PHP_HAVE_BUILTIN_CTZL) |
52 | 1.46M | return __builtin_ctzl(num); |
53 | | #elif (defined(__GNUC__) || __has_builtin(__builtin_ctzll)) && defined(PHP_HAVE_BUILTIN_CTZLL) |
54 | | return __builtin_ctzll(num); |
55 | | #elif defined(_WIN32) |
56 | | unsigned long index; |
57 | | |
58 | | #if defined(_WIN64) |
59 | | if (!BitScanForward64(&index, num)) { |
60 | | #else |
61 | | if (!BitScanForward(&index, num)) { |
62 | | #endif |
63 | | return SIZEOF_ZEND_LONG * 8; |
64 | | } |
65 | | |
66 | | return (int) index; |
67 | | #else |
68 | | int n; |
69 | | |
70 | | if (num == Z_UL(0)) return SIZEOF_ZEND_LONG * 8; |
71 | | |
72 | | n = 1; |
73 | | #if SIZEOF_ZEND_LONG == 8 |
74 | | if ((num & 0xffffffff) == 0) {n += 32; num = num >> Z_UL(32);} |
75 | | #endif |
76 | | if ((num & 0x0000ffff) == 0) {n += 16; num = num >> 16;} |
77 | | if ((num & 0x000000ff) == 0) {n += 8; num = num >> 8;} |
78 | | if ((num & 0x0000000f) == 0) {n += 4; num = num >> 4;} |
79 | | if ((num & 0x00000003) == 0) {n += 2; num = num >> 2;} |
80 | | return n - (num & 1); |
81 | | #endif |
82 | 1.46M | } Unexecuted instantiation: array.c:zend_ulong_ntz Unexecuted instantiation: math.c:zend_ulong_ntz Unexecuted instantiation: string.c:zend_ulong_ntz Unexecuted instantiation: block_pass.c:zend_ulong_ntz Unexecuted instantiation: compact_vars.c:zend_ulong_ntz Line | Count | Source | 49 | 178k | { | 50 | 178k | #if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) \ | 51 | 178k | && SIZEOF_ZEND_LONG == SIZEOF_LONG && defined(PHP_HAVE_BUILTIN_CTZL) | 52 | 178k | return __builtin_ctzl(num); | 53 | | #elif (defined(__GNUC__) || __has_builtin(__builtin_ctzll)) && defined(PHP_HAVE_BUILTIN_CTZLL) | 54 | | return __builtin_ctzll(num); | 55 | | #elif defined(_WIN32) | 56 | | unsigned long index; | 57 | | | 58 | | #if defined(_WIN64) | 59 | | if (!BitScanForward64(&index, num)) { | 60 | | #else | 61 | | if (!BitScanForward(&index, num)) { | 62 | | #endif | 63 | | return SIZEOF_ZEND_LONG * 8; | 64 | | } | 65 | | | 66 | | return (int) index; | 67 | | #else | 68 | | int n; | 69 | | | 70 | | if (num == Z_UL(0)) return SIZEOF_ZEND_LONG * 8; | 71 | | | 72 | | n = 1; | 73 | | #if SIZEOF_ZEND_LONG == 8 | 74 | | if ((num & 0xffffffff) == 0) {n += 32; num = num >> Z_UL(32);} | 75 | | #endif | 76 | | if ((num & 0x0000ffff) == 0) {n += 16; num = num >> 16;} | 77 | | if ((num & 0x000000ff) == 0) {n += 8; num = num >> 8;} | 78 | | if ((num & 0x0000000f) == 0) {n += 4; num = num >> 4;} | 79 | | if ((num & 0x00000003) == 0) {n += 2; num = num >> 2;} | 80 | | return n - (num & 1); | 81 | | #endif | 82 | 178k | } |
Unexecuted instantiation: dfa_pass.c:zend_ulong_ntz Unexecuted instantiation: escape_analysis.c:zend_ulong_ntz Unexecuted instantiation: optimize_temp_vars_5.c:zend_ulong_ntz Unexecuted instantiation: sccp.c:zend_ulong_ntz Line | Count | Source | 49 | 229k | { | 50 | 229k | #if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) \ | 51 | 229k | && SIZEOF_ZEND_LONG == SIZEOF_LONG && defined(PHP_HAVE_BUILTIN_CTZL) | 52 | 229k | return __builtin_ctzl(num); | 53 | | #elif (defined(__GNUC__) || __has_builtin(__builtin_ctzll)) && defined(PHP_HAVE_BUILTIN_CTZLL) | 54 | | return __builtin_ctzll(num); | 55 | | #elif defined(_WIN32) | 56 | | unsigned long index; | 57 | | | 58 | | #if defined(_WIN64) | 59 | | if (!BitScanForward64(&index, num)) { | 60 | | #else | 61 | | if (!BitScanForward(&index, num)) { | 62 | | #endif | 63 | | return SIZEOF_ZEND_LONG * 8; | 64 | | } | 65 | | | 66 | | return (int) index; | 67 | | #else | 68 | | int n; | 69 | | | 70 | | if (num == Z_UL(0)) return SIZEOF_ZEND_LONG * 8; | 71 | | | 72 | | n = 1; | 73 | | #if SIZEOF_ZEND_LONG == 8 | 74 | | if ((num & 0xffffffff) == 0) {n += 32; num = num >> Z_UL(32);} | 75 | | #endif | 76 | | if ((num & 0x0000ffff) == 0) {n += 16; num = num >> 16;} | 77 | | if ((num & 0x000000ff) == 0) {n += 8; num = num >> 8;} | 78 | | if ((num & 0x0000000f) == 0) {n += 4; num = num >> 4;} | 79 | | if ((num & 0x00000003) == 0) {n += 2; num = num >> 2;} | 80 | | return n - (num & 1); | 81 | | #endif | 82 | 229k | } |
Unexecuted instantiation: zend_call_graph.c:zend_ulong_ntz Unexecuted instantiation: zend_cfg.c:zend_ulong_ntz Unexecuted instantiation: zend_dfg.c:zend_ulong_ntz Unexecuted instantiation: zend_dump.c:zend_ulong_ntz Unexecuted instantiation: zend_func_info.c:zend_ulong_ntz zend_inference.c:zend_ulong_ntz Line | Count | Source | 49 | 1.05M | { | 50 | 1.05M | #if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) \ | 51 | 1.05M | && SIZEOF_ZEND_LONG == SIZEOF_LONG && defined(PHP_HAVE_BUILTIN_CTZL) | 52 | 1.05M | return __builtin_ctzl(num); | 53 | | #elif (defined(__GNUC__) || __has_builtin(__builtin_ctzll)) && defined(PHP_HAVE_BUILTIN_CTZLL) | 54 | | return __builtin_ctzll(num); | 55 | | #elif defined(_WIN32) | 56 | | unsigned long index; | 57 | | | 58 | | #if defined(_WIN64) | 59 | | if (!BitScanForward64(&index, num)) { | 60 | | #else | 61 | | if (!BitScanForward(&index, num)) { | 62 | | #endif | 63 | | return SIZEOF_ZEND_LONG * 8; | 64 | | } | 65 | | | 66 | | return (int) index; | 67 | | #else | 68 | | int n; | 69 | | | 70 | | if (num == Z_UL(0)) return SIZEOF_ZEND_LONG * 8; | 71 | | | 72 | | n = 1; | 73 | | #if SIZEOF_ZEND_LONG == 8 | 74 | | if ((num & 0xffffffff) == 0) {n += 32; num = num >> Z_UL(32);} | 75 | | #endif | 76 | | if ((num & 0x0000ffff) == 0) {n += 16; num = num >> 16;} | 77 | | if ((num & 0x000000ff) == 0) {n += 8; num = num >> 8;} | 78 | | if ((num & 0x0000000f) == 0) {n += 4; num = num >> 4;} | 79 | | if ((num & 0x00000003) == 0) {n += 2; num = num >> 2;} | 80 | | return n - (num & 1); | 81 | | #endif | 82 | 1.05M | } |
Unexecuted instantiation: zend_optimizer.c:zend_ulong_ntz Unexecuted instantiation: zend_ssa.c:zend_ulong_ntz Unexecuted instantiation: zend_alloc.c:zend_ulong_ntz |
83 | | |
84 | | /* Number of leading zero bits (Undefined for zero) */ |
85 | | ZEND_ATTRIBUTE_CONST static zend_always_inline int zend_ulong_nlz(zend_ulong num) |
86 | 0 | { |
87 | 0 | #if (defined(__GNUC__) || __has_builtin(__builtin_clzl)) \ |
88 | 0 | && SIZEOF_ZEND_LONG == SIZEOF_LONG && defined(PHP_HAVE_BUILTIN_CLZL) |
89 | 0 | return __builtin_clzl(num); |
90 | | #elif (defined(__GNUC__) || __has_builtin(__builtin_clzll)) && defined(PHP_HAVE_BUILTIN_CLZLL) |
91 | | return __builtin_clzll(num); |
92 | | #elif defined(_WIN32) |
93 | | unsigned long index; |
94 | | |
95 | | #if defined(_WIN64) |
96 | | if (!BitScanReverse64(&index, num)) { |
97 | | #else |
98 | | if (!BitScanReverse(&index, num)) { |
99 | | #endif |
100 | | return SIZEOF_ZEND_LONG * 8; |
101 | | } |
102 | | |
103 | | return (int) (SIZEOF_ZEND_LONG * 8 - 1)- index; |
104 | | #else |
105 | | zend_ulong x; |
106 | | int n; |
107 | | |
108 | | #if SIZEOF_ZEND_LONG == 8 |
109 | | n = 64; |
110 | | x = num >> 32; if (x != 0) {n -= 32; num = x;} |
111 | | #else |
112 | | n = 32; |
113 | | #endif |
114 | | x = num >> 16; if (x != 0) {n -= 16; num = x;} |
115 | | x = num >> 8; if (x != 0) {n -= 8; num = x;} |
116 | | x = num >> 4; if (x != 0) {n -= 4; num = x;} |
117 | | x = num >> 2; if (x != 0) {n -= 2; num = x;} |
118 | | x = num >> 1; if (x != 0) return n - 2; |
119 | | return n - num; |
120 | | #endif |
121 | 0 | } Unexecuted instantiation: array.c:zend_ulong_nlz Unexecuted instantiation: math.c:zend_ulong_nlz Unexecuted instantiation: string.c:zend_ulong_nlz Unexecuted instantiation: block_pass.c:zend_ulong_nlz Unexecuted instantiation: compact_vars.c:zend_ulong_nlz Unexecuted instantiation: dce.c:zend_ulong_nlz Unexecuted instantiation: dfa_pass.c:zend_ulong_nlz Unexecuted instantiation: escape_analysis.c:zend_ulong_nlz Unexecuted instantiation: optimize_temp_vars_5.c:zend_ulong_nlz Unexecuted instantiation: sccp.c:zend_ulong_nlz Unexecuted instantiation: scdf.c:zend_ulong_nlz Unexecuted instantiation: zend_call_graph.c:zend_ulong_nlz Unexecuted instantiation: zend_cfg.c:zend_ulong_nlz Unexecuted instantiation: zend_dfg.c:zend_ulong_nlz Unexecuted instantiation: zend_dump.c:zend_ulong_nlz Unexecuted instantiation: zend_func_info.c:zend_ulong_nlz Unexecuted instantiation: zend_inference.c:zend_ulong_nlz Unexecuted instantiation: zend_optimizer.c:zend_ulong_nlz Unexecuted instantiation: zend_ssa.c:zend_ulong_nlz Unexecuted instantiation: zend_alloc.c:zend_ulong_nlz |
122 | | |
123 | | /* Returns the number of zend_ulong words needed to store a bitset that is N |
124 | | bits long. */ |
125 | | static inline uint32_t zend_bitset_len(uint32_t n) |
126 | 2.63M | { |
127 | 2.63M | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); |
128 | 2.63M | } Unexecuted instantiation: array.c:zend_bitset_len Unexecuted instantiation: math.c:zend_bitset_len Unexecuted instantiation: string.c:zend_bitset_len block_pass.c:zend_bitset_len Line | Count | Source | 126 | 235k | { | 127 | 235k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 128 | 235k | } |
compact_vars.c:zend_bitset_len Line | Count | Source | 126 | 109k | { | 127 | 109k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 128 | 109k | } |
Line | Count | Source | 126 | 148k | { | 127 | 148k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 128 | 148k | } |
Unexecuted instantiation: dfa_pass.c:zend_bitset_len Unexecuted instantiation: escape_analysis.c:zend_bitset_len optimize_temp_vars_5.c:zend_bitset_len Line | Count | Source | 126 | 109k | { | 127 | 109k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 128 | 109k | } |
Unexecuted instantiation: sccp.c:zend_bitset_len Line | Count | Source | 126 | 296k | { | 127 | 296k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 128 | 296k | } |
zend_call_graph.c:zend_bitset_len Line | Count | Source | 126 | 67.3k | { | 127 | 67.3k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 128 | 67.3k | } |
zend_cfg.c:zend_bitset_len Line | Count | Source | 126 | 920k | { | 127 | 920k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 128 | 920k | } |
zend_dfg.c:zend_bitset_len Line | Count | Source | 126 | 74.1k | { | 127 | 74.1k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 128 | 74.1k | } |
Unexecuted instantiation: zend_dump.c:zend_bitset_len Unexecuted instantiation: zend_func_info.c:zend_bitset_len zend_inference.c:zend_bitset_len Line | Count | Source | 126 | 603k | { | 127 | 603k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 128 | 603k | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_len zend_ssa.c:zend_bitset_len Line | Count | Source | 126 | 74.1k | { | 127 | 74.1k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 128 | 74.1k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_len |
129 | | |
130 | | static inline bool zend_bitset_in(zend_bitset set, uint32_t n) |
131 | 11.5M | { |
132 | 11.5M | return ZEND_BIT_TEST(set, n); |
133 | 11.5M | } Unexecuted instantiation: array.c:zend_bitset_in Unexecuted instantiation: math.c:zend_bitset_in Unexecuted instantiation: string.c:zend_bitset_in block_pass.c:zend_bitset_in Line | Count | Source | 131 | 3.12M | { | 132 | 3.12M | return ZEND_BIT_TEST(set, n); | 133 | 3.12M | } |
compact_vars.c:zend_bitset_in Line | Count | Source | 131 | 754k | { | 132 | 754k | return ZEND_BIT_TEST(set, n); | 133 | 754k | } |
Line | Count | Source | 131 | 1.78M | { | 132 | 1.78M | return ZEND_BIT_TEST(set, n); | 133 | 1.78M | } |
Unexecuted instantiation: dfa_pass.c:zend_bitset_in Unexecuted instantiation: escape_analysis.c:zend_bitset_in optimize_temp_vars_5.c:zend_bitset_in Line | Count | Source | 131 | 1.47M | { | 132 | 1.47M | return ZEND_BIT_TEST(set, n); | 133 | 1.47M | } |
Line | Count | Source | 131 | 310k | { | 132 | 310k | return ZEND_BIT_TEST(set, n); | 133 | 310k | } |
Line | Count | Source | 131 | 847k | { | 132 | 847k | return ZEND_BIT_TEST(set, n); | 133 | 847k | } |
zend_call_graph.c:zend_bitset_in Line | Count | Source | 131 | 25.3k | { | 132 | 25.3k | return ZEND_BIT_TEST(set, n); | 133 | 25.3k | } |
zend_cfg.c:zend_bitset_in Line | Count | Source | 131 | 1.97M | { | 132 | 1.97M | return ZEND_BIT_TEST(set, n); | 133 | 1.97M | } |
zend_dfg.c:zend_bitset_in Line | Count | Source | 131 | 1.10M | { | 132 | 1.10M | return ZEND_BIT_TEST(set, n); | 133 | 1.10M | } |
Unexecuted instantiation: zend_dump.c:zend_bitset_in Unexecuted instantiation: zend_func_info.c:zend_bitset_in zend_inference.c:zend_bitset_in Line | Count | Source | 131 | 81.7k | { | 132 | 81.7k | return ZEND_BIT_TEST(set, n); | 133 | 81.7k | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_in zend_ssa.c:zend_bitset_in Line | Count | Source | 131 | 61.5k | { | 132 | 61.5k | return ZEND_BIT_TEST(set, n); | 133 | 61.5k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_in |
134 | | |
135 | | static inline void zend_bitset_incl(zend_bitset set, uint32_t n) |
136 | 17.6M | { |
137 | 17.6M | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); |
138 | 17.6M | } Unexecuted instantiation: array.c:zend_bitset_incl Unexecuted instantiation: math.c:zend_bitset_incl Unexecuted instantiation: string.c:zend_bitset_incl block_pass.c:zend_bitset_incl Line | Count | Source | 136 | 3.00M | { | 137 | 3.00M | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 138 | 3.00M | } |
compact_vars.c:zend_bitset_incl Line | Count | Source | 136 | 3.55M | { | 137 | 3.55M | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 138 | 3.55M | } |
Line | Count | Source | 136 | 1.10M | { | 137 | 1.10M | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 138 | 1.10M | } |
Unexecuted instantiation: dfa_pass.c:zend_bitset_incl Unexecuted instantiation: escape_analysis.c:zend_bitset_incl optimize_temp_vars_5.c:zend_bitset_incl Line | Count | Source | 136 | 955k | { | 137 | 955k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 138 | 955k | } |
Line | Count | Source | 136 | 1.29M | { | 137 | 1.29M | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 138 | 1.29M | } |
Line | Count | Source | 136 | 768k | { | 137 | 768k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 138 | 768k | } |
zend_call_graph.c:zend_bitset_incl Line | Count | Source | 136 | 23.7k | { | 137 | 23.7k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 138 | 23.7k | } |
zend_cfg.c:zend_bitset_incl Line | Count | Source | 136 | 1.51M | { | 137 | 1.51M | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 138 | 1.51M | } |
zend_dfg.c:zend_bitset_incl Line | Count | Source | 136 | 1.72M | { | 137 | 1.72M | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 138 | 1.72M | } |
Unexecuted instantiation: zend_dump.c:zend_bitset_incl Unexecuted instantiation: zend_func_info.c:zend_bitset_incl zend_inference.c:zend_bitset_incl Line | Count | Source | 136 | 3.60M | { | 137 | 3.60M | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 138 | 3.60M | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_incl zend_ssa.c:zend_bitset_incl Line | Count | Source | 136 | 55.8k | { | 137 | 55.8k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 138 | 55.8k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_incl |
139 | | |
140 | | static inline void zend_bitset_excl(zend_bitset set, uint32_t n) |
141 | 8.03M | { |
142 | 8.03M | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); |
143 | 8.03M | } Unexecuted instantiation: array.c:zend_bitset_excl Unexecuted instantiation: math.c:zend_bitset_excl Unexecuted instantiation: string.c:zend_bitset_excl block_pass.c:zend_bitset_excl Line | Count | Source | 141 | 1.30M | { | 142 | 1.30M | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 143 | 1.30M | } |
Unexecuted instantiation: compact_vars.c:zend_bitset_excl Line | Count | Source | 141 | 1.32M | { | 142 | 1.32M | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 143 | 1.32M | } |
Unexecuted instantiation: dfa_pass.c:zend_bitset_excl Unexecuted instantiation: escape_analysis.c:zend_bitset_excl optimize_temp_vars_5.c:zend_bitset_excl Line | Count | Source | 141 | 955k | { | 142 | 955k | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 143 | 955k | } |
Unexecuted instantiation: sccp.c:zend_bitset_excl Line | Count | Source | 141 | 1.77M | { | 142 | 1.77M | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 143 | 1.77M | } |
Unexecuted instantiation: zend_call_graph.c:zend_bitset_excl Unexecuted instantiation: zend_cfg.c:zend_bitset_excl zend_dfg.c:zend_bitset_excl Line | Count | Source | 141 | 261k | { | 142 | 261k | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 143 | 261k | } |
Unexecuted instantiation: zend_dump.c:zend_bitset_excl Unexecuted instantiation: zend_func_info.c:zend_bitset_excl zend_inference.c:zend_bitset_excl Line | Count | Source | 141 | 2.41M | { | 142 | 2.41M | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 143 | 2.41M | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_excl Unexecuted instantiation: zend_ssa.c:zend_bitset_excl Unexecuted instantiation: zend_alloc.c:zend_bitset_excl |
144 | | |
145 | | static inline void zend_bitset_clear(zend_bitset set, uint32_t len) |
146 | 983k | { |
147 | 983k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); |
148 | 983k | } Unexecuted instantiation: array.c:zend_bitset_clear Unexecuted instantiation: math.c:zend_bitset_clear Unexecuted instantiation: string.c:zend_bitset_clear block_pass.c:zend_bitset_clear Line | Count | Source | 146 | 528k | { | 147 | 528k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 148 | 528k | } |
compact_vars.c:zend_bitset_clear Line | Count | Source | 146 | 109k | { | 147 | 109k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 148 | 109k | } |
Unexecuted instantiation: dce.c:zend_bitset_clear Unexecuted instantiation: dfa_pass.c:zend_bitset_clear Unexecuted instantiation: escape_analysis.c:zend_bitset_clear optimize_temp_vars_5.c:zend_bitset_clear Line | Count | Source | 146 | 109k | { | 147 | 109k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 148 | 109k | } |
Unexecuted instantiation: sccp.c:zend_bitset_clear Unexecuted instantiation: scdf.c:zend_bitset_clear Unexecuted instantiation: zend_call_graph.c:zend_bitset_clear zend_cfg.c:zend_bitset_clear Line | Count | Source | 146 | 9.75k | { | 147 | 9.75k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 148 | 9.75k | } |
zend_dfg.c:zend_bitset_clear Line | Count | Source | 146 | 75.2k | { | 147 | 75.2k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 148 | 75.2k | } |
Unexecuted instantiation: zend_dump.c:zend_bitset_clear Unexecuted instantiation: zend_func_info.c:zend_bitset_clear zend_inference.c:zend_bitset_clear Line | Count | Source | 146 | 77.1k | { | 147 | 77.1k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 148 | 77.1k | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_clear zend_ssa.c:zend_bitset_clear Line | Count | Source | 146 | 74.1k | { | 147 | 74.1k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 148 | 74.1k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_clear |
149 | | |
150 | | static inline bool zend_bitset_empty(zend_bitset set, uint32_t len) |
151 | 2.29M | { |
152 | 2.29M | uint32_t i; |
153 | 9.43M | for (i = 0; i < len; i++) { |
154 | 8.59M | if (set[i]) { |
155 | 1.46M | return 0; |
156 | 1.46M | } |
157 | 8.59M | } |
158 | 831k | return 1; |
159 | 2.29M | } Unexecuted instantiation: array.c:zend_bitset_empty Unexecuted instantiation: math.c:zend_bitset_empty Unexecuted instantiation: string.c:zend_bitset_empty Unexecuted instantiation: block_pass.c:zend_bitset_empty Unexecuted instantiation: compact_vars.c:zend_bitset_empty Line | Count | Source | 151 | 168k | { | 152 | 168k | uint32_t i; | 153 | 334k | for (i = 0; i < len; i++) { | 154 | 177k | if (set[i]) { | 155 | 11.1k | return 0; | 156 | 11.1k | } | 157 | 177k | } | 158 | 157k | return 1; | 159 | 168k | } |
Unexecuted instantiation: dfa_pass.c:zend_bitset_empty Unexecuted instantiation: escape_analysis.c:zend_bitset_empty Unexecuted instantiation: optimize_temp_vars_5.c:zend_bitset_empty Unexecuted instantiation: sccp.c:zend_bitset_empty Line | Count | Source | 151 | 448k | { | 152 | 448k | uint32_t i; | 153 | 825k | for (i = 0; i < len; i++) { | 154 | 454k | if (set[i]) { | 155 | 77.1k | return 0; | 156 | 77.1k | } | 157 | 454k | } | 158 | 371k | return 1; | 159 | 448k | } |
Unexecuted instantiation: zend_call_graph.c:zend_bitset_empty Unexecuted instantiation: zend_cfg.c:zend_bitset_empty zend_dfg.c:zend_bitset_empty Line | Count | Source | 151 | 335k | { | 152 | 335k | uint32_t i; | 153 | 410k | for (i = 0; i < len; i++) { | 154 | 336k | if (set[i]) { | 155 | 261k | return 0; | 156 | 261k | } | 157 | 336k | } | 158 | 74.1k | return 1; | 159 | 335k | } |
Unexecuted instantiation: zend_dump.c:zend_bitset_empty Unexecuted instantiation: zend_func_info.c:zend_bitset_empty zend_inference.c:zend_bitset_empty Line | Count | Source | 151 | 1.13M | { | 152 | 1.13M | uint32_t i; | 153 | 7.11M | for (i = 0; i < len; i++) { | 154 | 7.03M | if (set[i]) { | 155 | 1.05M | return 0; | 156 | 1.05M | } | 157 | 7.03M | } | 158 | 74.1k | return 1; | 159 | 1.13M | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_empty zend_ssa.c:zend_bitset_empty Line | Count | Source | 151 | 216k | { | 152 | 216k | uint32_t i; | 153 | 748k | for (i = 0; i < len; i++) { | 154 | 593k | if (set[i]) { | 155 | 62.1k | return 0; | 156 | 62.1k | } | 157 | 593k | } | 158 | 154k | return 1; | 159 | 216k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_empty |
160 | | |
161 | | static inline void zend_bitset_fill(zend_bitset set, uint32_t len) |
162 | 0 | { |
163 | 0 | memset(set, 0xff, len * ZEND_BITSET_ELM_SIZE); |
164 | 0 | } Unexecuted instantiation: array.c:zend_bitset_fill Unexecuted instantiation: math.c:zend_bitset_fill Unexecuted instantiation: string.c:zend_bitset_fill Unexecuted instantiation: block_pass.c:zend_bitset_fill Unexecuted instantiation: compact_vars.c:zend_bitset_fill Unexecuted instantiation: dce.c:zend_bitset_fill Unexecuted instantiation: dfa_pass.c:zend_bitset_fill Unexecuted instantiation: escape_analysis.c:zend_bitset_fill Unexecuted instantiation: optimize_temp_vars_5.c:zend_bitset_fill Unexecuted instantiation: sccp.c:zend_bitset_fill Unexecuted instantiation: scdf.c:zend_bitset_fill Unexecuted instantiation: zend_call_graph.c:zend_bitset_fill Unexecuted instantiation: zend_cfg.c:zend_bitset_fill Unexecuted instantiation: zend_dfg.c:zend_bitset_fill Unexecuted instantiation: zend_dump.c:zend_bitset_fill Unexecuted instantiation: zend_func_info.c:zend_bitset_fill Unexecuted instantiation: zend_inference.c:zend_bitset_fill Unexecuted instantiation: zend_optimizer.c:zend_bitset_fill Unexecuted instantiation: zend_ssa.c:zend_bitset_fill Unexecuted instantiation: zend_alloc.c:zend_bitset_fill |
165 | | |
166 | | static inline bool zend_bitset_equal(zend_bitset set1, zend_bitset set2, uint32_t len) |
167 | 261k | { |
168 | 261k | return memcmp(set1, set2, len * ZEND_BITSET_ELM_SIZE) == 0; |
169 | 261k | } Unexecuted instantiation: array.c:zend_bitset_equal Unexecuted instantiation: math.c:zend_bitset_equal Unexecuted instantiation: string.c:zend_bitset_equal Unexecuted instantiation: block_pass.c:zend_bitset_equal Unexecuted instantiation: compact_vars.c:zend_bitset_equal Unexecuted instantiation: dce.c:zend_bitset_equal Unexecuted instantiation: dfa_pass.c:zend_bitset_equal Unexecuted instantiation: escape_analysis.c:zend_bitset_equal Unexecuted instantiation: optimize_temp_vars_5.c:zend_bitset_equal Unexecuted instantiation: sccp.c:zend_bitset_equal Unexecuted instantiation: scdf.c:zend_bitset_equal Unexecuted instantiation: zend_call_graph.c:zend_bitset_equal Unexecuted instantiation: zend_cfg.c:zend_bitset_equal zend_dfg.c:zend_bitset_equal Line | Count | Source | 167 | 261k | { | 168 | 261k | return memcmp(set1, set2, len * ZEND_BITSET_ELM_SIZE) == 0; | 169 | 261k | } |
Unexecuted instantiation: zend_dump.c:zend_bitset_equal Unexecuted instantiation: zend_func_info.c:zend_bitset_equal Unexecuted instantiation: zend_inference.c:zend_bitset_equal Unexecuted instantiation: zend_optimizer.c:zend_bitset_equal Unexecuted instantiation: zend_ssa.c:zend_bitset_equal Unexecuted instantiation: zend_alloc.c:zend_bitset_equal |
170 | | |
171 | | static inline void zend_bitset_copy(zend_bitset set1, zend_bitset set2, uint32_t len) |
172 | 766k | { |
173 | 766k | memcpy(set1, set2, len * ZEND_BITSET_ELM_SIZE); |
174 | 766k | } Unexecuted instantiation: array.c:zend_bitset_copy Unexecuted instantiation: math.c:zend_bitset_copy Unexecuted instantiation: string.c:zend_bitset_copy block_pass.c:zend_bitset_copy Line | Count | Source | 172 | 387k | { | 173 | 387k | memcpy(set1, set2, len * ZEND_BITSET_ELM_SIZE); | 174 | 387k | } |
Unexecuted instantiation: compact_vars.c:zend_bitset_copy Unexecuted instantiation: dce.c:zend_bitset_copy Unexecuted instantiation: dfa_pass.c:zend_bitset_copy Unexecuted instantiation: escape_analysis.c:zend_bitset_copy Unexecuted instantiation: optimize_temp_vars_5.c:zend_bitset_copy Unexecuted instantiation: sccp.c:zend_bitset_copy Unexecuted instantiation: scdf.c:zend_bitset_copy Unexecuted instantiation: zend_call_graph.c:zend_bitset_copy Unexecuted instantiation: zend_cfg.c:zend_bitset_copy zend_dfg.c:zend_bitset_copy Line | Count | Source | 172 | 378k | { | 173 | 378k | memcpy(set1, set2, len * ZEND_BITSET_ELM_SIZE); | 174 | 378k | } |
Unexecuted instantiation: zend_dump.c:zend_bitset_copy Unexecuted instantiation: zend_func_info.c:zend_bitset_copy Unexecuted instantiation: zend_inference.c:zend_bitset_copy Unexecuted instantiation: zend_optimizer.c:zend_bitset_copy Unexecuted instantiation: zend_ssa.c:zend_bitset_copy Unexecuted instantiation: zend_alloc.c:zend_bitset_copy |
175 | | |
176 | | static inline void zend_bitset_intersection(zend_bitset set1, zend_bitset set2, uint32_t len) |
177 | 0 | { |
178 | 0 | uint32_t i; |
179 | 0 |
|
180 | 0 | for (i = 0; i < len; i++) { |
181 | 0 | set1[i] &= set2[i]; |
182 | 0 | } |
183 | 0 | } Unexecuted instantiation: array.c:zend_bitset_intersection Unexecuted instantiation: math.c:zend_bitset_intersection Unexecuted instantiation: string.c:zend_bitset_intersection Unexecuted instantiation: block_pass.c:zend_bitset_intersection Unexecuted instantiation: compact_vars.c:zend_bitset_intersection Unexecuted instantiation: dce.c:zend_bitset_intersection Unexecuted instantiation: dfa_pass.c:zend_bitset_intersection Unexecuted instantiation: escape_analysis.c:zend_bitset_intersection Unexecuted instantiation: optimize_temp_vars_5.c:zend_bitset_intersection Unexecuted instantiation: sccp.c:zend_bitset_intersection Unexecuted instantiation: scdf.c:zend_bitset_intersection Unexecuted instantiation: zend_call_graph.c:zend_bitset_intersection Unexecuted instantiation: zend_cfg.c:zend_bitset_intersection Unexecuted instantiation: zend_dfg.c:zend_bitset_intersection Unexecuted instantiation: zend_dump.c:zend_bitset_intersection Unexecuted instantiation: zend_func_info.c:zend_bitset_intersection Unexecuted instantiation: zend_inference.c:zend_bitset_intersection Unexecuted instantiation: zend_optimizer.c:zend_bitset_intersection Unexecuted instantiation: zend_ssa.c:zend_bitset_intersection Unexecuted instantiation: zend_alloc.c:zend_bitset_intersection |
184 | | |
185 | | static inline void zend_bitset_union(zend_bitset set1, zend_bitset set2, uint32_t len) |
186 | 289k | { |
187 | 289k | uint32_t i; |
188 | | |
189 | 1.78M | for (i = 0; i < len; i++) { |
190 | 1.49M | set1[i] |= set2[i]; |
191 | 1.49M | } |
192 | 289k | } Unexecuted instantiation: array.c:zend_bitset_union Unexecuted instantiation: math.c:zend_bitset_union Unexecuted instantiation: string.c:zend_bitset_union block_pass.c:zend_bitset_union Line | Count | Source | 186 | 135k | { | 187 | 135k | uint32_t i; | 188 | | | 189 | 652k | for (i = 0; i < len; i++) { | 190 | 516k | set1[i] |= set2[i]; | 191 | 516k | } | 192 | 135k | } |
Unexecuted instantiation: compact_vars.c:zend_bitset_union Unexecuted instantiation: dce.c:zend_bitset_union Unexecuted instantiation: dfa_pass.c:zend_bitset_union Unexecuted instantiation: escape_analysis.c:zend_bitset_union Unexecuted instantiation: optimize_temp_vars_5.c:zend_bitset_union Unexecuted instantiation: sccp.c:zend_bitset_union Unexecuted instantiation: scdf.c:zend_bitset_union Unexecuted instantiation: zend_call_graph.c:zend_bitset_union Unexecuted instantiation: zend_cfg.c:zend_bitset_union zend_dfg.c:zend_bitset_union Line | Count | Source | 186 | 93.3k | { | 187 | 93.3k | uint32_t i; | 188 | | | 189 | 636k | for (i = 0; i < len; i++) { | 190 | 543k | set1[i] |= set2[i]; | 191 | 543k | } | 192 | 93.3k | } |
Unexecuted instantiation: zend_dump.c:zend_bitset_union Unexecuted instantiation: zend_func_info.c:zend_bitset_union zend_inference.c:zend_bitset_union Line | Count | Source | 186 | 2 | { | 187 | 2 | uint32_t i; | 188 | | | 189 | 4 | for (i = 0; i < len; i++) { | 190 | 2 | set1[i] |= set2[i]; | 191 | 2 | } | 192 | 2 | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_union zend_ssa.c:zend_bitset_union Line | Count | Source | 186 | 60.2k | { | 187 | 60.2k | uint32_t i; | 188 | | | 189 | 496k | for (i = 0; i < len; i++) { | 190 | 436k | set1[i] |= set2[i]; | 191 | 436k | } | 192 | 60.2k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_union |
193 | | |
194 | | static inline void zend_bitset_difference(zend_bitset set1, zend_bitset set2, uint32_t len) |
195 | 0 | { |
196 | 0 | uint32_t i; |
197 | 0 |
|
198 | 0 | for (i = 0; i < len; i++) { |
199 | 0 | set1[i] = set1[i] & ~set2[i]; |
200 | 0 | } |
201 | 0 | } Unexecuted instantiation: array.c:zend_bitset_difference Unexecuted instantiation: math.c:zend_bitset_difference Unexecuted instantiation: string.c:zend_bitset_difference Unexecuted instantiation: block_pass.c:zend_bitset_difference Unexecuted instantiation: compact_vars.c:zend_bitset_difference Unexecuted instantiation: dce.c:zend_bitset_difference Unexecuted instantiation: dfa_pass.c:zend_bitset_difference Unexecuted instantiation: escape_analysis.c:zend_bitset_difference Unexecuted instantiation: optimize_temp_vars_5.c:zend_bitset_difference Unexecuted instantiation: sccp.c:zend_bitset_difference Unexecuted instantiation: scdf.c:zend_bitset_difference Unexecuted instantiation: zend_call_graph.c:zend_bitset_difference Unexecuted instantiation: zend_cfg.c:zend_bitset_difference Unexecuted instantiation: zend_dfg.c:zend_bitset_difference Unexecuted instantiation: zend_dump.c:zend_bitset_difference Unexecuted instantiation: zend_func_info.c:zend_bitset_difference Unexecuted instantiation: zend_inference.c:zend_bitset_difference Unexecuted instantiation: zend_optimizer.c:zend_bitset_difference Unexecuted instantiation: zend_ssa.c:zend_bitset_difference Unexecuted instantiation: zend_alloc.c:zend_bitset_difference |
202 | | |
203 | | static inline void zend_bitset_union_with_intersection(zend_bitset set1, zend_bitset set2, zend_bitset set3, zend_bitset set4, uint32_t len) |
204 | 206k | { |
205 | 206k | uint32_t i; |
206 | | |
207 | 1.37M | for (i = 0; i < len; i++) { |
208 | 1.17M | set1[i] = set2[i] | (set3[i] & set4[i]); |
209 | 1.17M | } |
210 | 206k | } Unexecuted instantiation: array.c:zend_bitset_union_with_intersection Unexecuted instantiation: math.c:zend_bitset_union_with_intersection Unexecuted instantiation: string.c:zend_bitset_union_with_intersection Unexecuted instantiation: block_pass.c:zend_bitset_union_with_intersection Unexecuted instantiation: compact_vars.c:zend_bitset_union_with_intersection Unexecuted instantiation: dce.c:zend_bitset_union_with_intersection Unexecuted instantiation: dfa_pass.c:zend_bitset_union_with_intersection Unexecuted instantiation: escape_analysis.c:zend_bitset_union_with_intersection Unexecuted instantiation: optimize_temp_vars_5.c:zend_bitset_union_with_intersection Unexecuted instantiation: sccp.c:zend_bitset_union_with_intersection Unexecuted instantiation: scdf.c:zend_bitset_union_with_intersection Unexecuted instantiation: zend_call_graph.c:zend_bitset_union_with_intersection Unexecuted instantiation: zend_cfg.c:zend_bitset_union_with_intersection Unexecuted instantiation: zend_dfg.c:zend_bitset_union_with_intersection Unexecuted instantiation: zend_dump.c:zend_bitset_union_with_intersection Unexecuted instantiation: zend_func_info.c:zend_bitset_union_with_intersection Unexecuted instantiation: zend_inference.c:zend_bitset_union_with_intersection Unexecuted instantiation: zend_optimizer.c:zend_bitset_union_with_intersection zend_ssa.c:zend_bitset_union_with_intersection Line | Count | Source | 204 | 206k | { | 205 | 206k | uint32_t i; | 206 | | | 207 | 1.37M | for (i = 0; i < len; i++) { | 208 | 1.17M | set1[i] = set2[i] | (set3[i] & set4[i]); | 209 | 1.17M | } | 210 | 206k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_union_with_intersection |
211 | | |
212 | | static inline void zend_bitset_union_with_difference(zend_bitset set1, zend_bitset set2, zend_bitset set3, zend_bitset set4, uint32_t len) |
213 | 261k | { |
214 | 261k | uint32_t i; |
215 | | |
216 | 1.41M | for (i = 0; i < len; i++) { |
217 | 1.15M | set1[i] = set2[i] | (set3[i] & ~set4[i]); |
218 | 1.15M | } |
219 | 261k | } Unexecuted instantiation: array.c:zend_bitset_union_with_difference Unexecuted instantiation: math.c:zend_bitset_union_with_difference Unexecuted instantiation: string.c:zend_bitset_union_with_difference Unexecuted instantiation: block_pass.c:zend_bitset_union_with_difference Unexecuted instantiation: compact_vars.c:zend_bitset_union_with_difference Unexecuted instantiation: dce.c:zend_bitset_union_with_difference Unexecuted instantiation: dfa_pass.c:zend_bitset_union_with_difference Unexecuted instantiation: escape_analysis.c:zend_bitset_union_with_difference Unexecuted instantiation: optimize_temp_vars_5.c:zend_bitset_union_with_difference Unexecuted instantiation: sccp.c:zend_bitset_union_with_difference Unexecuted instantiation: scdf.c:zend_bitset_union_with_difference Unexecuted instantiation: zend_call_graph.c:zend_bitset_union_with_difference Unexecuted instantiation: zend_cfg.c:zend_bitset_union_with_difference zend_dfg.c:zend_bitset_union_with_difference Line | Count | Source | 213 | 261k | { | 214 | 261k | uint32_t i; | 215 | | | 216 | 1.41M | for (i = 0; i < len; i++) { | 217 | 1.15M | set1[i] = set2[i] | (set3[i] & ~set4[i]); | 218 | 1.15M | } | 219 | 261k | } |
Unexecuted instantiation: zend_dump.c:zend_bitset_union_with_difference Unexecuted instantiation: zend_func_info.c:zend_bitset_union_with_difference Unexecuted instantiation: zend_inference.c:zend_bitset_union_with_difference Unexecuted instantiation: zend_optimizer.c:zend_bitset_union_with_difference Unexecuted instantiation: zend_ssa.c:zend_bitset_union_with_difference Unexecuted instantiation: zend_alloc.c:zend_bitset_union_with_difference |
220 | | |
221 | | static inline bool zend_bitset_subset(zend_bitset set1, zend_bitset set2, uint32_t len) |
222 | 134k | { |
223 | 134k | uint32_t i; |
224 | | |
225 | 598k | for (i = 0; i < len; i++) { |
226 | 524k | if (set1[i] & ~set2[i]) { |
227 | 60.2k | return 0; |
228 | 60.2k | } |
229 | 524k | } |
230 | 73.7k | return 1; |
231 | 134k | } Unexecuted instantiation: array.c:zend_bitset_subset Unexecuted instantiation: math.c:zend_bitset_subset Unexecuted instantiation: string.c:zend_bitset_subset Unexecuted instantiation: block_pass.c:zend_bitset_subset Unexecuted instantiation: compact_vars.c:zend_bitset_subset Unexecuted instantiation: dce.c:zend_bitset_subset Unexecuted instantiation: dfa_pass.c:zend_bitset_subset Unexecuted instantiation: escape_analysis.c:zend_bitset_subset Unexecuted instantiation: optimize_temp_vars_5.c:zend_bitset_subset Unexecuted instantiation: sccp.c:zend_bitset_subset Unexecuted instantiation: scdf.c:zend_bitset_subset Unexecuted instantiation: zend_call_graph.c:zend_bitset_subset Unexecuted instantiation: zend_cfg.c:zend_bitset_subset Unexecuted instantiation: zend_dfg.c:zend_bitset_subset Unexecuted instantiation: zend_dump.c:zend_bitset_subset Unexecuted instantiation: zend_func_info.c:zend_bitset_subset Unexecuted instantiation: zend_inference.c:zend_bitset_subset Unexecuted instantiation: zend_optimizer.c:zend_bitset_subset zend_ssa.c:zend_bitset_subset Line | Count | Source | 222 | 134k | { | 223 | 134k | uint32_t i; | 224 | | | 225 | 598k | for (i = 0; i < len; i++) { | 226 | 524k | if (set1[i] & ~set2[i]) { | 227 | 60.2k | return 0; | 228 | 60.2k | } | 229 | 524k | } | 230 | 73.7k | return 1; | 231 | 134k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_subset |
232 | | |
233 | | static inline int zend_bitset_first(zend_bitset set, uint32_t len) |
234 | 1.79M | { |
235 | 1.79M | uint32_t i; |
236 | | |
237 | 9.75M | for (i = 0; i < len; i++) { |
238 | 9.42M | if (set[i]) { |
239 | 1.46M | return ZEND_BITSET_ELM_SIZE * 8 * i + zend_ulong_ntz(set[i]); |
240 | 1.46M | } |
241 | 9.42M | } |
242 | 327k | return -1; /* empty set */ |
243 | 1.79M | } Unexecuted instantiation: array.c:zend_bitset_first Unexecuted instantiation: math.c:zend_bitset_first Unexecuted instantiation: string.c:zend_bitset_first Unexecuted instantiation: block_pass.c:zend_bitset_first Unexecuted instantiation: compact_vars.c:zend_bitset_first Line | Count | Source | 234 | 275k | { | 235 | 275k | uint32_t i; | 236 | | | 237 | 1.91M | for (i = 0; i < len; i++) { | 238 | 1.81M | if (set[i]) { | 239 | 178k | return ZEND_BITSET_ELM_SIZE * 8 * i + zend_ulong_ntz(set[i]); | 240 | 178k | } | 241 | 1.81M | } | 242 | 96.3k | return -1; /* empty set */ | 243 | 275k | } |
Unexecuted instantiation: dfa_pass.c:zend_bitset_first Unexecuted instantiation: escape_analysis.c:zend_bitset_first Unexecuted instantiation: optimize_temp_vars_5.c:zend_bitset_first Unexecuted instantiation: sccp.c:zend_bitset_first Line | Count | Source | 234 | 461k | { | 235 | 461k | uint32_t i; | 236 | | | 237 | 869k | for (i = 0; i < len; i++) { | 238 | 637k | if (set[i]) { | 239 | 229k | return ZEND_BITSET_ELM_SIZE * 8 * i + zend_ulong_ntz(set[i]); | 240 | 229k | } | 241 | 637k | } | 242 | 231k | return -1; /* empty set */ | 243 | 461k | } |
Unexecuted instantiation: zend_call_graph.c:zend_bitset_first Unexecuted instantiation: zend_cfg.c:zend_bitset_first Unexecuted instantiation: zend_dfg.c:zend_bitset_first Unexecuted instantiation: zend_dump.c:zend_bitset_first Unexecuted instantiation: zend_func_info.c:zend_bitset_first zend_inference.c:zend_bitset_first Line | Count | Source | 234 | 1.05M | { | 235 | 1.05M | uint32_t i; | 236 | | | 237 | 6.97M | for (i = 0; i < len; i++) { | 238 | 6.97M | if (set[i]) { | 239 | 1.05M | return ZEND_BITSET_ELM_SIZE * 8 * i + zend_ulong_ntz(set[i]); | 240 | 1.05M | } | 241 | 6.97M | } | 242 | 0 | return -1; /* empty set */ | 243 | 1.05M | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_first Unexecuted instantiation: zend_ssa.c:zend_bitset_first Unexecuted instantiation: zend_alloc.c:zend_bitset_first |
244 | | |
245 | | static inline int zend_bitset_last(zend_bitset set, uint32_t len) |
246 | 261k | { |
247 | 261k | uint32_t i = len; |
248 | | |
249 | 502k | while (i > 0) { |
250 | 502k | i--; |
251 | 502k | if (set[i]) { |
252 | 261k | int j = ZEND_BITSET_ELM_SIZE * 8 * i - 1; |
253 | 261k | zend_ulong x = set[i]; |
254 | 4.29M | while (x != Z_UL(0)) { |
255 | 4.03M | x = x >> Z_UL(1); |
256 | 4.03M | j++; |
257 | 4.03M | } |
258 | 261k | return j; |
259 | 261k | } |
260 | 502k | } |
261 | 0 | return -1; /* empty set */ |
262 | 261k | } Unexecuted instantiation: array.c:zend_bitset_last Unexecuted instantiation: math.c:zend_bitset_last Unexecuted instantiation: string.c:zend_bitset_last Unexecuted instantiation: block_pass.c:zend_bitset_last Unexecuted instantiation: compact_vars.c:zend_bitset_last Unexecuted instantiation: dce.c:zend_bitset_last Unexecuted instantiation: dfa_pass.c:zend_bitset_last Unexecuted instantiation: escape_analysis.c:zend_bitset_last Unexecuted instantiation: optimize_temp_vars_5.c:zend_bitset_last Unexecuted instantiation: sccp.c:zend_bitset_last Unexecuted instantiation: scdf.c:zend_bitset_last Unexecuted instantiation: zend_call_graph.c:zend_bitset_last Unexecuted instantiation: zend_cfg.c:zend_bitset_last zend_dfg.c:zend_bitset_last Line | Count | Source | 246 | 261k | { | 247 | 261k | uint32_t i = len; | 248 | | | 249 | 502k | while (i > 0) { | 250 | 502k | i--; | 251 | 502k | if (set[i]) { | 252 | 261k | int j = ZEND_BITSET_ELM_SIZE * 8 * i - 1; | 253 | 261k | zend_ulong x = set[i]; | 254 | 4.29M | while (x != Z_UL(0)) { | 255 | 4.03M | x = x >> Z_UL(1); | 256 | 4.03M | j++; | 257 | 4.03M | } | 258 | 261k | return j; | 259 | 261k | } | 260 | 502k | } | 261 | 0 | return -1; /* empty set */ | 262 | 261k | } |
Unexecuted instantiation: zend_dump.c:zend_bitset_last Unexecuted instantiation: zend_func_info.c:zend_bitset_last Unexecuted instantiation: zend_inference.c:zend_bitset_last Unexecuted instantiation: zend_optimizer.c:zend_bitset_last Unexecuted instantiation: zend_ssa.c:zend_bitset_last Unexecuted instantiation: zend_alloc.c:zend_bitset_last |
263 | | |
264 | 760k | #define ZEND_BITSET_FOREACH(set, len, bit) do { \ |
265 | 760k | zend_bitset _set = (set); \ |
266 | 760k | uint32_t _i, _len = (len); \ |
267 | 2.85M | for (_i = 0; _i < _len; _i++) { \ |
268 | 2.09M | zend_ulong _x = _set[_i]; \ |
269 | 2.09M | if (_x) { \ |
270 | 346k | (bit) = ZEND_BITSET_ELM_SIZE * 8 * _i; \ |
271 | 8.37M | for (; _x != 0; _x >>= Z_UL(1), (bit)++) { \ |
272 | 8.02M | if (!(_x & Z_UL(1))) continue; |
273 | | |
274 | 62.1k | #define ZEND_BITSET_REVERSE_FOREACH(set, len, bit) do { \ |
275 | 62.1k | zend_bitset _set = (set); \ |
276 | 62.1k | uint32_t _i = (len); \ |
277 | 62.1k | zend_ulong _test = Z_UL(1) << (ZEND_BITSET_ELM_SIZE * 8 - 1); \ |
278 | 500k | while (_i-- > 0) { \ |
279 | 437k | zend_ulong _x = _set[_i]; \ |
280 | 437k | if (_x) { \ |
281 | 90.6k | (bit) = ZEND_BITSET_ELM_SIZE * 8 * (_i + 1) - 1; \ |
282 | 4.84M | for (; _x != 0; _x <<= Z_UL(1), (bit)--) { \ |
283 | 4.74M | if (!(_x & _test)) continue; \ |
284 | | |
285 | | #define ZEND_BITSET_FOREACH_END() \ |
286 | 1.49M | } \ |
287 | 437k | } \ |
288 | 2.52M | } \ |
289 | 822k | } while (0) |
290 | | |
291 | 736k | static inline int zend_bitset_pop_first(zend_bitset set, uint32_t len) { |
292 | 736k | int i = zend_bitset_first(set, len); |
293 | 736k | if (i >= 0) { |
294 | 408k | zend_bitset_excl(set, i); |
295 | 408k | } |
296 | 736k | return i; |
297 | 736k | } Unexecuted instantiation: array.c:zend_bitset_pop_first Unexecuted instantiation: math.c:zend_bitset_pop_first Unexecuted instantiation: string.c:zend_bitset_pop_first Unexecuted instantiation: block_pass.c:zend_bitset_pop_first Unexecuted instantiation: compact_vars.c:zend_bitset_pop_first dce.c:zend_bitset_pop_first Line | Count | Source | 291 | 275k | static inline int zend_bitset_pop_first(zend_bitset set, uint32_t len) { | 292 | 275k | int i = zend_bitset_first(set, len); | 293 | 275k | if (i >= 0) { | 294 | 178k | zend_bitset_excl(set, i); | 295 | 178k | } | 296 | 275k | return i; | 297 | 275k | } |
Unexecuted instantiation: dfa_pass.c:zend_bitset_pop_first Unexecuted instantiation: escape_analysis.c:zend_bitset_pop_first Unexecuted instantiation: optimize_temp_vars_5.c:zend_bitset_pop_first Unexecuted instantiation: sccp.c:zend_bitset_pop_first scdf.c:zend_bitset_pop_first Line | Count | Source | 291 | 461k | static inline int zend_bitset_pop_first(zend_bitset set, uint32_t len) { | 292 | 461k | int i = zend_bitset_first(set, len); | 293 | 461k | if (i >= 0) { | 294 | 229k | zend_bitset_excl(set, i); | 295 | 229k | } | 296 | 461k | return i; | 297 | 461k | } |
Unexecuted instantiation: zend_call_graph.c:zend_bitset_pop_first Unexecuted instantiation: zend_cfg.c:zend_bitset_pop_first Unexecuted instantiation: zend_dfg.c:zend_bitset_pop_first Unexecuted instantiation: zend_dump.c:zend_bitset_pop_first Unexecuted instantiation: zend_func_info.c:zend_bitset_pop_first Unexecuted instantiation: zend_inference.c:zend_bitset_pop_first Unexecuted instantiation: zend_optimizer.c:zend_bitset_pop_first Unexecuted instantiation: zend_ssa.c:zend_bitset_pop_first Unexecuted instantiation: zend_alloc.c:zend_bitset_pop_first |
298 | | |
299 | | #endif /* _ZEND_BITSET_H_ */ |