/src/php-src/Zend/zend_bitset.h
Line | Count | Source |
1 | | /* |
2 | | +----------------------------------------------------------------------+ |
3 | | | Zend OPcache JIT | |
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_BITSET_H_ |
18 | | #define _ZEND_BITSET_H_ |
19 | | |
20 | | #include <stdint.h> |
21 | | #include <stdbool.h> |
22 | | #include <string.h> |
23 | | |
24 | | #include "zend_portability.h" |
25 | | #include "zend_long.h" |
26 | | |
27 | | typedef zend_ulong *zend_bitset; |
28 | | |
29 | 2.07M | #define ZEND_BITSET_ELM_SIZE sizeof(zend_ulong) |
30 | | |
31 | | #if SIZEOF_ZEND_LONG == 4 |
32 | | # define ZEND_BITSET_ELM_NUM(n) ((n) >> 5) |
33 | | # define ZEND_BITSET_BIT_NUM(n) ((zend_ulong)(n) & Z_UL(0x1f)) |
34 | | #elif SIZEOF_ZEND_LONG == 8 |
35 | 11.5M | # define ZEND_BITSET_ELM_NUM(n) ((n) >> 6) |
36 | 11.5M | # define ZEND_BITSET_BIT_NUM(n) ((zend_ulong)(n) & Z_UL(0x3f)) |
37 | | #else |
38 | | # define ZEND_BITSET_ELM_NUM(n) ((n) / (sizeof(zend_long) * 8)) |
39 | | # define ZEND_BITSET_BIT_NUM(n) ((n) % (sizeof(zend_long) * 8)) |
40 | | #endif |
41 | | |
42 | | #define ZEND_BITSET_ALLOCA(n, use_heap) \ |
43 | 137k | (zend_bitset)do_alloca((n) * ZEND_BITSET_ELM_SIZE, use_heap) |
44 | | |
45 | | /* Number of trailing zero bits (0x01 -> 0; 0x40 -> 6; 0x00 -> LEN) */ |
46 | | ZEND_ATTRIBUTE_CONST static zend_always_inline int zend_ulong_ntz(zend_ulong num) |
47 | 666k | { |
48 | 666k | #if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) \ |
49 | 666k | && SIZEOF_ZEND_LONG == SIZEOF_LONG && defined(PHP_HAVE_BUILTIN_CTZL) |
50 | 666k | return __builtin_ctzl(num); |
51 | | #elif (defined(__GNUC__) || __has_builtin(__builtin_ctzll)) && defined(PHP_HAVE_BUILTIN_CTZLL) |
52 | | return __builtin_ctzll(num); |
53 | | #elif defined(_WIN32) |
54 | | unsigned long index; |
55 | | |
56 | | #if defined(_WIN64) |
57 | | if (!BitScanForward64(&index, num)) { |
58 | | #else |
59 | | if (!BitScanForward(&index, num)) { |
60 | | #endif |
61 | | return SIZEOF_ZEND_LONG * 8; |
62 | | } |
63 | | |
64 | | return (int) index; |
65 | | #else |
66 | | int n; |
67 | | |
68 | | if (num == Z_UL(0)) return SIZEOF_ZEND_LONG * 8; |
69 | | |
70 | | n = 1; |
71 | | #if SIZEOF_ZEND_LONG == 8 |
72 | | if ((num & 0xffffffff) == 0) {n += 32; num = num >> Z_UL(32);} |
73 | | #endif |
74 | | if ((num & 0x0000ffff) == 0) {n += 16; num = num >> 16;} |
75 | | if ((num & 0x000000ff) == 0) {n += 8; num = num >> 8;} |
76 | | if ((num & 0x0000000f) == 0) {n += 4; num = num >> 4;} |
77 | | if ((num & 0x00000003) == 0) {n += 2; num = num >> 2;} |
78 | | return n - (num & 1); |
79 | | #endif |
80 | 666k | } Unexecuted instantiation: zend_jit.c:zend_ulong_ntz 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 | 47 | 60.7k | { | 48 | 60.7k | #if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) \ | 49 | 60.7k | && SIZEOF_ZEND_LONG == SIZEOF_LONG && defined(PHP_HAVE_BUILTIN_CTZL) | 50 | 60.7k | return __builtin_ctzl(num); | 51 | | #elif (defined(__GNUC__) || __has_builtin(__builtin_ctzll)) && defined(PHP_HAVE_BUILTIN_CTZLL) | 52 | | return __builtin_ctzll(num); | 53 | | #elif defined(_WIN32) | 54 | | unsigned long index; | 55 | | | 56 | | #if defined(_WIN64) | 57 | | if (!BitScanForward64(&index, num)) { | 58 | | #else | 59 | | if (!BitScanForward(&index, num)) { | 60 | | #endif | 61 | | return SIZEOF_ZEND_LONG * 8; | 62 | | } | 63 | | | 64 | | return (int) index; | 65 | | #else | 66 | | int n; | 67 | | | 68 | | if (num == Z_UL(0)) return SIZEOF_ZEND_LONG * 8; | 69 | | | 70 | | n = 1; | 71 | | #if SIZEOF_ZEND_LONG == 8 | 72 | | if ((num & 0xffffffff) == 0) {n += 32; num = num >> Z_UL(32);} | 73 | | #endif | 74 | | if ((num & 0x0000ffff) == 0) {n += 16; num = num >> 16;} | 75 | | if ((num & 0x000000ff) == 0) {n += 8; num = num >> 8;} | 76 | | if ((num & 0x0000000f) == 0) {n += 4; num = num >> 4;} | 77 | | if ((num & 0x00000003) == 0) {n += 2; num = num >> 2;} | 78 | | return n - (num & 1); | 79 | | #endif | 80 | 60.7k | } |
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 | 47 | 101k | { | 48 | 101k | #if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) \ | 49 | 101k | && SIZEOF_ZEND_LONG == SIZEOF_LONG && defined(PHP_HAVE_BUILTIN_CTZL) | 50 | 101k | return __builtin_ctzl(num); | 51 | | #elif (defined(__GNUC__) || __has_builtin(__builtin_ctzll)) && defined(PHP_HAVE_BUILTIN_CTZLL) | 52 | | return __builtin_ctzll(num); | 53 | | #elif defined(_WIN32) | 54 | | unsigned long index; | 55 | | | 56 | | #if defined(_WIN64) | 57 | | if (!BitScanForward64(&index, num)) { | 58 | | #else | 59 | | if (!BitScanForward(&index, num)) { | 60 | | #endif | 61 | | return SIZEOF_ZEND_LONG * 8; | 62 | | } | 63 | | | 64 | | return (int) index; | 65 | | #else | 66 | | int n; | 67 | | | 68 | | if (num == Z_UL(0)) return SIZEOF_ZEND_LONG * 8; | 69 | | | 70 | | n = 1; | 71 | | #if SIZEOF_ZEND_LONG == 8 | 72 | | if ((num & 0xffffffff) == 0) {n += 32; num = num >> Z_UL(32);} | 73 | | #endif | 74 | | if ((num & 0x0000ffff) == 0) {n += 16; num = num >> 16;} | 75 | | if ((num & 0x000000ff) == 0) {n += 8; num = num >> 8;} | 76 | | if ((num & 0x0000000f) == 0) {n += 4; num = num >> 4;} | 77 | | if ((num & 0x00000003) == 0) {n += 2; num = num >> 2;} | 78 | | return n - (num & 1); | 79 | | #endif | 80 | 101k | } |
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 | 47 | 504k | { | 48 | 504k | #if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) \ | 49 | 504k | && SIZEOF_ZEND_LONG == SIZEOF_LONG && defined(PHP_HAVE_BUILTIN_CTZL) | 50 | 504k | return __builtin_ctzl(num); | 51 | | #elif (defined(__GNUC__) || __has_builtin(__builtin_ctzll)) && defined(PHP_HAVE_BUILTIN_CTZLL) | 52 | | return __builtin_ctzll(num); | 53 | | #elif defined(_WIN32) | 54 | | unsigned long index; | 55 | | | 56 | | #if defined(_WIN64) | 57 | | if (!BitScanForward64(&index, num)) { | 58 | | #else | 59 | | if (!BitScanForward(&index, num)) { | 60 | | #endif | 61 | | return SIZEOF_ZEND_LONG * 8; | 62 | | } | 63 | | | 64 | | return (int) index; | 65 | | #else | 66 | | int n; | 67 | | | 68 | | if (num == Z_UL(0)) return SIZEOF_ZEND_LONG * 8; | 69 | | | 70 | | n = 1; | 71 | | #if SIZEOF_ZEND_LONG == 8 | 72 | | if ((num & 0xffffffff) == 0) {n += 32; num = num >> Z_UL(32);} | 73 | | #endif | 74 | | if ((num & 0x0000ffff) == 0) {n += 16; num = num >> 16;} | 75 | | if ((num & 0x000000ff) == 0) {n += 8; num = num >> 8;} | 76 | | if ((num & 0x0000000f) == 0) {n += 4; num = num >> 4;} | 77 | | if ((num & 0x00000003) == 0) {n += 2; num = num >> 2;} | 78 | | return n - (num & 1); | 79 | | #endif | 80 | 504k | } |
Unexecuted instantiation: zend_optimizer.c:zend_ulong_ntz Unexecuted instantiation: zend_ssa.c:zend_ulong_ntz Unexecuted instantiation: zend_alloc.c:zend_ulong_ntz |
81 | | |
82 | | /* Number of leading zero bits (Undefined for zero) */ |
83 | | ZEND_ATTRIBUTE_CONST static zend_always_inline int zend_ulong_nlz(zend_ulong num) |
84 | 0 | { |
85 | 0 | #if (defined(__GNUC__) || __has_builtin(__builtin_clzl)) \ |
86 | 0 | && SIZEOF_ZEND_LONG == SIZEOF_LONG && defined(PHP_HAVE_BUILTIN_CLZL) |
87 | 0 | return __builtin_clzl(num); |
88 | | #elif (defined(__GNUC__) || __has_builtin(__builtin_clzll)) && defined(PHP_HAVE_BUILTIN_CLZLL) |
89 | | return __builtin_clzll(num); |
90 | | #elif defined(_WIN32) |
91 | | unsigned long index; |
92 | | |
93 | | #if defined(_WIN64) |
94 | | if (!BitScanReverse64(&index, num)) { |
95 | | #else |
96 | | if (!BitScanReverse(&index, num)) { |
97 | | #endif |
98 | | return SIZEOF_ZEND_LONG * 8; |
99 | | } |
100 | | |
101 | | return (int) (SIZEOF_ZEND_LONG * 8 - 1)- index; |
102 | | #else |
103 | | zend_ulong x; |
104 | | int n; |
105 | | |
106 | | #if SIZEOF_ZEND_LONG == 8 |
107 | | n = 64; |
108 | | x = num >> 32; if (x != 0) {n -= 32; num = x;} |
109 | | #else |
110 | | n = 32; |
111 | | #endif |
112 | | x = num >> 16; if (x != 0) {n -= 16; num = x;} |
113 | | x = num >> 8; if (x != 0) {n -= 8; num = x;} |
114 | | x = num >> 4; if (x != 0) {n -= 4; num = x;} |
115 | | x = num >> 2; if (x != 0) {n -= 2; num = x;} |
116 | | x = num >> 1; if (x != 0) return n - 2; |
117 | | return n - num; |
118 | | #endif |
119 | 0 | } Unexecuted instantiation: zend_jit.c:zend_ulong_nlz 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 |
120 | | |
121 | | /* Returns the number of zend_ulong words needed to store a bitset that is N |
122 | | bits long. */ |
123 | | static inline uint32_t zend_bitset_len(uint32_t n) |
124 | 1.14M | { |
125 | 1.14M | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); |
126 | 1.14M | } Unexecuted instantiation: zend_jit.c:zend_bitset_len 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 | 124 | 94.1k | { | 125 | 94.1k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 94.1k | } |
compact_vars.c:zend_bitset_len Line | Count | Source | 124 | 45.3k | { | 125 | 45.3k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 45.3k | } |
Line | Count | Source | 124 | 68.1k | { | 125 | 68.1k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 68.1k | } |
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 | 124 | 45.3k | { | 125 | 45.3k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 45.3k | } |
Unexecuted instantiation: sccp.c:zend_bitset_len Line | Count | Source | 124 | 136k | { | 125 | 136k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 136k | } |
zend_call_graph.c:zend_bitset_len Line | Count | Source | 124 | 23.5k | { | 125 | 23.5k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 23.5k | } |
zend_cfg.c:zend_bitset_len Line | Count | Source | 124 | 367k | { | 125 | 367k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 367k | } |
zend_dfg.c:zend_bitset_len Line | Count | Source | 124 | 34.0k | { | 125 | 34.0k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 34.0k | } |
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 | 124 | 292k | { | 125 | 292k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 292k | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_len zend_ssa.c:zend_bitset_len Line | Count | Source | 124 | 34.0k | { | 125 | 34.0k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 34.0k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_len |
127 | | |
128 | | static inline bool zend_bitset_in(zend_bitset set, uint32_t n) |
129 | 78.1M | { |
130 | 78.1M | return ZEND_BIT_TEST(set, n); |
131 | 78.1M | } Unexecuted instantiation: zend_jit.c:zend_bitset_in 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 | 129 | 1.29M | { | 130 | 1.29M | return ZEND_BIT_TEST(set, n); | 131 | 1.29M | } |
compact_vars.c:zend_bitset_in Line | Count | Source | 129 | 340k | { | 130 | 340k | return ZEND_BIT_TEST(set, n); | 131 | 340k | } |
Line | Count | Source | 129 | 863k | { | 130 | 863k | return ZEND_BIT_TEST(set, n); | 131 | 863k | } |
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 | 129 | 73.7M | { | 130 | 73.7M | return ZEND_BIT_TEST(set, n); | 131 | 73.7M | } |
Line | Count | Source | 129 | 112k | { | 130 | 112k | return ZEND_BIT_TEST(set, n); | 131 | 112k | } |
Line | Count | Source | 129 | 344k | { | 130 | 344k | return ZEND_BIT_TEST(set, n); | 131 | 344k | } |
zend_call_graph.c:zend_bitset_in Line | Count | Source | 129 | 14.2k | { | 130 | 14.2k | return ZEND_BIT_TEST(set, n); | 131 | 14.2k | } |
zend_cfg.c:zend_bitset_in Line | Count | Source | 129 | 801k | { | 130 | 801k | return ZEND_BIT_TEST(set, n); | 131 | 801k | } |
zend_dfg.c:zend_bitset_in Line | Count | Source | 129 | 547k | { | 130 | 547k | return ZEND_BIT_TEST(set, n); | 131 | 547k | } |
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 | 129 | 70.3k | { | 130 | 70.3k | return ZEND_BIT_TEST(set, n); | 131 | 70.3k | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_in zend_ssa.c:zend_bitset_in Line | Count | Source | 129 | 21.4k | { | 130 | 21.4k | return ZEND_BIT_TEST(set, n); | 131 | 21.4k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_in |
132 | | |
133 | | static inline void zend_bitset_incl(zend_bitset set, uint32_t n) |
134 | 7.73M | { |
135 | 7.73M | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); |
136 | 7.73M | } Unexecuted instantiation: zend_jit.c:zend_bitset_incl 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 | 134 | 1.21M | { | 135 | 1.21M | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 1.21M | } |
compact_vars.c:zend_bitset_incl Line | Count | Source | 134 | 1.49M | { | 135 | 1.49M | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 1.49M | } |
Line | Count | Source | 134 | 508k | { | 135 | 508k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 508k | } |
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 | 134 | 424k | { | 135 | 424k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 424k | } |
Line | Count | Source | 134 | 584k | { | 135 | 584k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 584k | } |
Line | Count | Source | 134 | 315k | { | 135 | 315k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 315k | } |
zend_call_graph.c:zend_bitset_incl Line | Count | Source | 134 | 12.9k | { | 135 | 12.9k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 12.9k | } |
zend_cfg.c:zend_bitset_incl Line | Count | Source | 134 | 616k | { | 135 | 616k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 616k | } |
zend_dfg.c:zend_bitset_incl Line | Count | Source | 134 | 800k | { | 135 | 800k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 800k | } |
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 | 134 | 1.74M | { | 135 | 1.74M | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 1.74M | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_incl zend_ssa.c:zend_bitset_incl Line | Count | Source | 134 | 17.6k | { | 135 | 17.6k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 17.6k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_incl |
137 | | |
138 | | static inline void zend_bitset_excl(zend_bitset set, uint32_t n) |
139 | 3.77M | { |
140 | 3.77M | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); |
141 | 3.77M | } Unexecuted instantiation: zend_jit.c:zend_bitset_excl 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 | 139 | 541k | { | 140 | 541k | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 141 | 541k | } |
Unexecuted instantiation: compact_vars.c:zend_bitset_excl Line | Count | Source | 139 | 551k | { | 140 | 551k | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 141 | 551k | } |
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 | 139 | 423k | { | 140 | 423k | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 141 | 423k | } |
Unexecuted instantiation: sccp.c:zend_bitset_excl Line | Count | Source | 139 | 897k | { | 140 | 897k | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 141 | 897k | } |
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 | 139 | 120k | { | 140 | 120k | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 141 | 120k | } |
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 | 139 | 1.24M | { | 140 | 1.24M | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 141 | 1.24M | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_excl Unexecuted instantiation: zend_ssa.c:zend_bitset_excl Unexecuted instantiation: zend_alloc.c:zend_bitset_excl |
142 | | |
143 | | static inline void zend_bitset_clear(zend_bitset set, uint32_t len) |
144 | 407k | { |
145 | 407k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); |
146 | 407k | } Unexecuted instantiation: zend_jit.c:zend_bitset_clear 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 | 144 | 205k | { | 145 | 205k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 146 | 205k | } |
compact_vars.c:zend_bitset_clear Line | Count | Source | 144 | 45.3k | { | 145 | 45.3k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 146 | 45.3k | } |
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 | 144 | 45.3k | { | 145 | 45.3k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 146 | 45.3k | } |
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 | 144 | 6.09k | { | 145 | 6.09k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 146 | 6.09k | } |
zend_dfg.c:zend_bitset_clear Line | Count | Source | 144 | 35.1k | { | 145 | 35.1k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 146 | 35.1k | } |
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 | 144 | 35.9k | { | 145 | 35.9k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 146 | 35.9k | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_clear zend_ssa.c:zend_bitset_clear Line | Count | Source | 144 | 34.0k | { | 145 | 34.0k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 146 | 34.0k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_clear |
147 | | |
148 | | static inline bool zend_bitset_empty(zend_bitset set, uint32_t len) |
149 | 1.07M | { |
150 | 1.07M | uint32_t i; |
151 | 4.45M | for (i = 0; i < len; i++) { |
152 | 4.07M | if (set[i]) { |
153 | 691k | return 0; |
154 | 691k | } |
155 | 4.07M | } |
156 | 383k | return 1; |
157 | 1.07M | } Unexecuted instantiation: zend_jit.c:zend_bitset_empty 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 | 149 | 81.2k | { | 150 | 81.2k | uint32_t i; | 151 | 160k | for (i = 0; i < len; i++) { | 152 | 85.9k | if (set[i]) { | 153 | 7.24k | return 0; | 154 | 7.24k | } | 155 | 85.9k | } | 156 | 74.0k | return 1; | 157 | 81.2k | } |
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 | 149 | 207k | { | 150 | 207k | uint32_t i; | 151 | 382k | for (i = 0; i < len; i++) { | 152 | 211k | if (set[i]) { | 153 | 36.2k | return 0; | 154 | 36.2k | } | 155 | 211k | } | 156 | 171k | return 1; | 157 | 207k | } |
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 | 149 | 154k | { | 150 | 154k | uint32_t i; | 151 | 188k | for (i = 0; i < len; i++) { | 152 | 154k | if (set[i]) { | 153 | 120k | return 0; | 154 | 120k | } | 155 | 154k | } | 156 | 34.0k | return 1; | 157 | 154k | } |
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 | 149 | 538k | { | 150 | 538k | uint32_t i; | 151 | 3.46M | for (i = 0; i < len; i++) { | 152 | 3.43M | if (set[i]) { | 153 | 504k | return 0; | 154 | 504k | } | 155 | 3.43M | } | 156 | 34.0k | return 1; | 157 | 538k | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_empty zend_ssa.c:zend_bitset_empty Line | Count | Source | 149 | 92.9k | { | 150 | 92.9k | uint32_t i; | 151 | 260k | for (i = 0; i < len; i++) { | 152 | 190k | if (set[i]) { | 153 | 22.9k | return 0; | 154 | 22.9k | } | 155 | 190k | } | 156 | 70.0k | return 1; | 157 | 92.9k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_empty |
158 | | |
159 | | static inline void zend_bitset_fill(zend_bitset set, uint32_t len) |
160 | 0 | { |
161 | 0 | memset(set, 0xff, len * ZEND_BITSET_ELM_SIZE); |
162 | 0 | } Unexecuted instantiation: zend_jit.c:zend_bitset_fill 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 |
163 | | |
164 | | static inline bool zend_bitset_equal(zend_bitset set1, zend_bitset set2, uint32_t len) |
165 | 120k | { |
166 | 120k | return memcmp(set1, set2, len * ZEND_BITSET_ELM_SIZE) == 0; |
167 | 120k | } Unexecuted instantiation: zend_jit.c:zend_bitset_equal 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 | 165 | 120k | { | 166 | 120k | return memcmp(set1, set2, len * ZEND_BITSET_ELM_SIZE) == 0; | 167 | 120k | } |
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 |
168 | | |
169 | | static inline void zend_bitset_copy(zend_bitset set1, zend_bitset set2, uint32_t len) |
170 | 321k | { |
171 | 321k | memcpy(set1, set2, len * ZEND_BITSET_ELM_SIZE); |
172 | 321k | } Unexecuted instantiation: zend_jit.c:zend_bitset_copy 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 | 170 | 150k | { | 171 | 150k | memcpy(set1, set2, len * ZEND_BITSET_ELM_SIZE); | 172 | 150k | } |
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 | 170 | 171k | { | 171 | 171k | memcpy(set1, set2, len * ZEND_BITSET_ELM_SIZE); | 172 | 171k | } |
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 |
173 | | |
174 | | static inline void zend_bitset_intersection(zend_bitset set1, zend_bitset set2, uint32_t len) |
175 | 0 | { |
176 | 0 | uint32_t i; |
177 | |
|
178 | 0 | for (i = 0; i < len; i++) { |
179 | 0 | set1[i] &= set2[i]; |
180 | 0 | } |
181 | 0 | } Unexecuted instantiation: zend_jit.c:zend_bitset_intersection 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 |
182 | | |
183 | | static inline void zend_bitset_union(zend_bitset set1, zend_bitset set2, uint32_t len) |
184 | 122k | { |
185 | 122k | uint32_t i; |
186 | | |
187 | 565k | for (i = 0; i < len; i++) { |
188 | 443k | set1[i] |= set2[i]; |
189 | 443k | } |
190 | 122k | } Unexecuted instantiation: zend_jit.c:zend_bitset_union 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 | 184 | 57.1k | { | 185 | 57.1k | uint32_t i; | 186 | | | 187 | 209k | for (i = 0; i < len; i++) { | 188 | 152k | set1[i] |= set2[i]; | 189 | 152k | } | 190 | 57.1k | } |
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 | 184 | 43.2k | { | 185 | 43.2k | uint32_t i; | 186 | | | 187 | 222k | for (i = 0; i < len; i++) { | 188 | 179k | set1[i] |= set2[i]; | 189 | 179k | } | 190 | 43.2k | } |
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 | 184 | 4 | { | 185 | 4 | uint32_t i; | 186 | | | 187 | 8 | for (i = 0; i < len; i++) { | 188 | 4 | set1[i] |= set2[i]; | 189 | 4 | } | 190 | 4 | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_union zend_ssa.c:zend_bitset_union Line | Count | Source | 184 | 21.7k | { | 185 | 21.7k | uint32_t i; | 186 | | | 187 | 133k | for (i = 0; i < len; i++) { | 188 | 111k | set1[i] |= set2[i]; | 189 | 111k | } | 190 | 21.7k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_union |
191 | | |
192 | | static inline void zend_bitset_difference(zend_bitset set1, zend_bitset set2, uint32_t len) |
193 | 0 | { |
194 | 0 | uint32_t i; |
195 | 0 |
|
196 | 0 | for (i = 0; i < len; i++) { |
197 | 0 | set1[i] = set1[i] & ~set2[i]; |
198 | 0 | } |
199 | 0 | } Unexecuted instantiation: zend_jit.c:zend_bitset_difference 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 |
200 | | |
201 | | static inline void zend_bitset_union_with_intersection(zend_bitset set1, zend_bitset set2, zend_bitset set3, zend_bitset set4, uint32_t len) |
202 | 102k | { |
203 | 102k | uint32_t i; |
204 | | |
205 | 525k | for (i = 0; i < len; i++) { |
206 | 423k | set1[i] = set2[i] | (set3[i] & set4[i]); |
207 | 423k | } |
208 | 102k | } Unexecuted instantiation: zend_jit.c:zend_bitset_union_with_intersection 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 | 202 | 102k | { | 203 | 102k | uint32_t i; | 204 | | | 205 | 525k | for (i = 0; i < len; i++) { | 206 | 423k | set1[i] = set2[i] | (set3[i] & set4[i]); | 207 | 423k | } | 208 | 102k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_union_with_intersection |
209 | | |
210 | | static inline void zend_bitset_union_with_difference(zend_bitset set1, zend_bitset set2, zend_bitset set3, zend_bitset set4, uint32_t len) |
211 | 120k | { |
212 | 120k | uint32_t i; |
213 | | |
214 | 511k | for (i = 0; i < len; i++) { |
215 | 390k | set1[i] = set2[i] | (set3[i] & ~set4[i]); |
216 | 390k | } |
217 | 120k | } Unexecuted instantiation: zend_jit.c:zend_bitset_union_with_difference 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 | 211 | 120k | { | 212 | 120k | uint32_t i; | 213 | | | 214 | 511k | for (i = 0; i < len; i++) { | 215 | 390k | set1[i] = set2[i] | (set3[i] & ~set4[i]); | 216 | 390k | } | 217 | 120k | } |
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 |
218 | | |
219 | | static inline bool zend_bitset_subset(zend_bitset set1, zend_bitset set2, uint32_t len) |
220 | 51.8k | { |
221 | 51.8k | uint32_t i; |
222 | | |
223 | 187k | for (i = 0; i < len; i++) { |
224 | 156k | if (set1[i] & ~set2[i]) { |
225 | 21.7k | return 0; |
226 | 21.7k | } |
227 | 156k | } |
228 | 30.0k | return 1; |
229 | 51.8k | } Unexecuted instantiation: zend_jit.c:zend_bitset_subset 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 | 220 | 51.8k | { | 221 | 51.8k | uint32_t i; | 222 | | | 223 | 187k | for (i = 0; i < len; i++) { | 224 | 156k | if (set1[i] & ~set2[i]) { | 225 | 21.7k | return 0; | 226 | 21.7k | } | 227 | 156k | } | 228 | 30.0k | return 1; | 229 | 51.8k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_subset |
230 | | |
231 | | static inline int zend_bitset_first(zend_bitset set, uint32_t len) |
232 | 823k | { |
233 | 823k | uint32_t i; |
234 | | |
235 | 4.23M | for (i = 0; i < len; i++) { |
236 | 4.07M | if (set[i]) { |
237 | 666k | return ZEND_BITSET_ELM_SIZE * 8 * i + zend_ulong_ntz(set[i]); |
238 | 666k | } |
239 | 4.07M | } |
240 | 157k | return -1; /* empty set */ |
241 | 823k | } Unexecuted instantiation: zend_jit.c:zend_bitset_first 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 | 232 | 109k | { | 233 | 109k | uint32_t i; | 234 | | | 235 | 475k | for (i = 0; i < len; i++) { | 236 | 426k | if (set[i]) { | 237 | 60.7k | return ZEND_BITSET_ELM_SIZE * 8 * i + zend_ulong_ntz(set[i]); | 238 | 60.7k | } | 239 | 426k | } | 240 | 48.5k | return -1; /* empty set */ | 241 | 109k | } |
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 | 232 | 209k | { | 233 | 209k | uint32_t i; | 234 | | | 235 | 355k | for (i = 0; i < len; i++) { | 236 | 246k | if (set[i]) { | 237 | 101k | return ZEND_BITSET_ELM_SIZE * 8 * i + zend_ulong_ntz(set[i]); | 238 | 101k | } | 239 | 246k | } | 240 | 108k | return -1; /* empty set */ | 241 | 209k | } |
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 | 232 | 504k | { | 233 | 504k | uint32_t i; | 234 | | | 235 | 3.40M | for (i = 0; i < len; i++) { | 236 | 3.40M | if (set[i]) { | 237 | 504k | return ZEND_BITSET_ELM_SIZE * 8 * i + zend_ulong_ntz(set[i]); | 238 | 504k | } | 239 | 3.40M | } | 240 | 0 | return -1; /* empty set */ | 241 | 504k | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_first Unexecuted instantiation: zend_ssa.c:zend_bitset_first Unexecuted instantiation: zend_alloc.c:zend_bitset_first |
242 | | |
243 | | static inline int zend_bitset_last(zend_bitset set, uint32_t len) |
244 | 120k | { |
245 | 120k | uint32_t i = len; |
246 | | |
247 | 187k | while (i > 0) { |
248 | 187k | i--; |
249 | 187k | if (set[i]) { |
250 | 120k | int j = ZEND_BITSET_ELM_SIZE * 8 * i - 1; |
251 | 120k | zend_ulong x = set[i]; |
252 | 1.56M | while (x != Z_UL(0)) { |
253 | 1.44M | x = x >> Z_UL(1); |
254 | 1.44M | j++; |
255 | 1.44M | } |
256 | 120k | return j; |
257 | 120k | } |
258 | 187k | } |
259 | 0 | return -1; /* empty set */ |
260 | 120k | } Unexecuted instantiation: zend_jit.c:zend_bitset_last 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 | 244 | 120k | { | 245 | 120k | uint32_t i = len; | 246 | | | 247 | 187k | while (i > 0) { | 248 | 187k | i--; | 249 | 187k | if (set[i]) { | 250 | 120k | int j = ZEND_BITSET_ELM_SIZE * 8 * i - 1; | 251 | 120k | zend_ulong x = set[i]; | 252 | 1.56M | while (x != Z_UL(0)) { | 253 | 1.44M | x = x >> Z_UL(1); | 254 | 1.44M | j++; | 255 | 1.44M | } | 256 | 120k | return j; | 257 | 120k | } | 258 | 187k | } | 259 | 0 | return -1; /* empty set */ | 260 | 120k | } |
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 |
261 | | |
262 | 457k | #define ZEND_BITSET_FOREACH(set, len, bit) do { \ |
263 | 457k | zend_bitset _set = (set); \ |
264 | 457k | uint32_t _i, _len = (len); \ |
265 | 1.38M | for (_i = 0; _i < _len; _i++) { \ |
266 | 925k | zend_ulong _x = _set[_i]; \ |
267 | 925k | if (_x) { \ |
268 | 210k | (bit) = ZEND_BITSET_ELM_SIZE * 8 * _i; \ |
269 | 5.12M | for (; _x != 0; _x >>= Z_UL(1), (bit)++) { \ |
270 | 4.91M | if (!(_x & Z_UL(1))) continue; |
271 | | |
272 | 22.9k | #define ZEND_BITSET_REVERSE_FOREACH(set, len, bit) do { \ |
273 | 22.9k | zend_bitset _set = (set); \ |
274 | 22.9k | uint32_t _i = (len); \ |
275 | 22.9k | zend_ulong _test = Z_UL(1) << (ZEND_BITSET_ELM_SIZE * 8 - 1); \ |
276 | 136k | while (_i-- > 0) { \ |
277 | 113k | zend_ulong _x = _set[_i]; \ |
278 | 113k | if (_x) { \ |
279 | 29.1k | (bit) = ZEND_BITSET_ELM_SIZE * 8 * (_i + 1) - 1; \ |
280 | 1.57M | for (; _x != 0; _x <<= Z_UL(1), (bit)--) { \ |
281 | 1.54M | if (!(_x & _test)) continue; \ |
282 | | |
283 | | #define ZEND_BITSET_FOREACH_END() \ |
284 | 794k | } \ |
285 | 239k | } \ |
286 | 1.03M | } \ |
287 | 480k | } while (0) |
288 | | |
289 | 319k | static inline int zend_bitset_pop_first(zend_bitset set, uint32_t len) { |
290 | 319k | int i = zend_bitset_first(set, len); |
291 | 319k | if (i >= 0) { |
292 | 161k | zend_bitset_excl(set, i); |
293 | 161k | } |
294 | 319k | return i; |
295 | 319k | } Unexecuted instantiation: zend_jit.c:zend_bitset_pop_first 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 | 289 | 109k | static inline int zend_bitset_pop_first(zend_bitset set, uint32_t len) { | 290 | 109k | int i = zend_bitset_first(set, len); | 291 | 109k | if (i >= 0) { | 292 | 60.7k | zend_bitset_excl(set, i); | 293 | 60.7k | } | 294 | 109k | return i; | 295 | 109k | } |
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 | 289 | 209k | static inline int zend_bitset_pop_first(zend_bitset set, uint32_t len) { | 290 | 209k | int i = zend_bitset_first(set, len); | 291 | 209k | if (i >= 0) { | 292 | 101k | zend_bitset_excl(set, i); | 293 | 101k | } | 294 | 209k | return i; | 295 | 209k | } |
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 |
296 | | |
297 | | #endif /* _ZEND_BITSET_H_ */ |