/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.17M | #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 | 147k | (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 | 737k | { |
48 | 737k | #if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) \ |
49 | 737k | && SIZEOF_ZEND_LONG == SIZEOF_LONG && defined(PHP_HAVE_BUILTIN_CTZL) |
50 | 737k | 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 | 737k | } 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 | 81.5k | { | 48 | 81.5k | #if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) \ | 49 | 81.5k | && SIZEOF_ZEND_LONG == SIZEOF_LONG && defined(PHP_HAVE_BUILTIN_CTZL) | 50 | 81.5k | 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 | 81.5k | } |
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 | 114k | { | 48 | 114k | #if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) \ | 49 | 114k | && SIZEOF_ZEND_LONG == SIZEOF_LONG && defined(PHP_HAVE_BUILTIN_CTZL) | 50 | 114k | 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 | 114k | } |
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 | 541k | { | 48 | 541k | #if (defined(__GNUC__) || __has_builtin(__builtin_ctzl)) \ | 49 | 541k | && SIZEOF_ZEND_LONG == SIZEOF_LONG && defined(PHP_HAVE_BUILTIN_CTZL) | 50 | 541k | 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 | 541k | } |
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.20M | { |
125 | 1.20M | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); |
126 | 1.20M | } 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 | 97.1k | { | 125 | 97.1k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 97.1k | } |
compact_vars.c:zend_bitset_len Line | Count | Source | 124 | 47.7k | { | 125 | 47.7k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 47.7k | } |
Line | Count | Source | 124 | 74.3k | { | 125 | 74.3k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 74.3k | } |
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 | 47.7k | { | 125 | 47.7k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 47.7k | } |
Unexecuted instantiation: sccp.c:zend_bitset_len Line | Count | Source | 124 | 148k | { | 125 | 148k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 148k | } |
zend_call_graph.c:zend_bitset_len Line | Count | Source | 124 | 25.9k | { | 125 | 25.9k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 25.9k | } |
zend_cfg.c:zend_bitset_len Line | Count | Source | 124 | 376k | { | 125 | 376k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 376k | } |
zend_dfg.c:zend_bitset_len Line | Count | Source | 124 | 37.1k | { | 125 | 37.1k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 37.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 | 124 | 307k | { | 125 | 307k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 307k | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_len zend_ssa.c:zend_bitset_len Line | Count | Source | 124 | 37.1k | { | 125 | 37.1k | return (n + ((sizeof(zend_long) * 8) - 1)) / (sizeof(zend_long) * 8); | 126 | 37.1k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_len |
127 | | |
128 | | static inline bool zend_bitset_in(zend_bitset set, uint32_t n) |
129 | 47.1M | { |
130 | 47.1M | return ZEND_BIT_TEST(set, n); |
131 | 47.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.24M | { | 130 | 1.24M | return ZEND_BIT_TEST(set, n); | 131 | 1.24M | } |
compact_vars.c:zend_bitset_in Line | Count | Source | 129 | 303k | { | 130 | 303k | return ZEND_BIT_TEST(set, n); | 131 | 303k | } |
Line | Count | Source | 129 | 922k | { | 130 | 922k | return ZEND_BIT_TEST(set, n); | 131 | 922k | } |
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 | 42.5M | { | 130 | 42.5M | return ZEND_BIT_TEST(set, n); | 131 | 42.5M | } |
Line | Count | Source | 129 | 145k | { | 130 | 145k | return ZEND_BIT_TEST(set, n); | 131 | 145k | } |
Line | Count | Source | 129 | 410k | { | 130 | 410k | return ZEND_BIT_TEST(set, n); | 131 | 410k | } |
zend_call_graph.c:zend_bitset_in Line | Count | Source | 129 | 12.6k | { | 130 | 12.6k | return ZEND_BIT_TEST(set, n); | 131 | 12.6k | } |
zend_cfg.c:zend_bitset_in Line | Count | Source | 129 | 864k | { | 130 | 864k | return ZEND_BIT_TEST(set, n); | 131 | 864k | } |
zend_dfg.c:zend_bitset_in Line | Count | Source | 129 | 553k | { | 130 | 553k | return ZEND_BIT_TEST(set, n); | 131 | 553k | } |
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 | 48.3k | { | 130 | 48.3k | return ZEND_BIT_TEST(set, n); | 131 | 48.3k | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_in zend_ssa.c:zend_bitset_in Line | Count | Source | 129 | 27.6k | { | 130 | 27.6k | return ZEND_BIT_TEST(set, n); | 131 | 27.6k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_in |
132 | | |
133 | | static inline void zend_bitset_incl(zend_bitset set, uint32_t n) |
134 | 7.81M | { |
135 | 7.81M | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); |
136 | 7.81M | } 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.19M | { | 135 | 1.19M | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 1.19M | } |
compact_vars.c:zend_bitset_incl Line | Count | Source | 134 | 1.45M | { | 135 | 1.45M | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 1.45M | } |
Line | Count | Source | 134 | 544k | { | 135 | 544k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 544k | } |
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 | 413k | { | 135 | 413k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 413k | } |
Line | Count | Source | 134 | 635k | { | 135 | 635k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 635k | } |
Line | Count | Source | 134 | 372k | { | 135 | 372k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 372k | } |
zend_call_graph.c:zend_bitset_incl Line | Count | Source | 134 | 11.7k | { | 135 | 11.7k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 11.7k | } |
zend_cfg.c:zend_bitset_incl Line | Count | Source | 134 | 647k | { | 135 | 647k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 647k | } |
zend_dfg.c:zend_bitset_incl Line | Count | Source | 134 | 848k | { | 135 | 848k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 848k | } |
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.66M | { | 135 | 1.66M | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 1.66M | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_incl zend_ssa.c:zend_bitset_incl Line | Count | Source | 134 | 24.4k | { | 135 | 24.4k | set[ZEND_BITSET_ELM_NUM(n)] |= Z_UL(1) << ZEND_BITSET_BIT_NUM(n); | 136 | 24.4k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_incl |
137 | | |
138 | | static inline void zend_bitset_excl(zend_bitset set, uint32_t n) |
139 | 3.75M | { |
140 | 3.75M | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); |
141 | 3.75M | } 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 | 531k | { | 140 | 531k | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 141 | 531k | } |
Unexecuted instantiation: compact_vars.c:zend_bitset_excl Line | Count | Source | 139 | 640k | { | 140 | 640k | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 141 | 640k | } |
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 | 413k | { | 140 | 413k | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 141 | 413k | } |
Unexecuted instantiation: sccp.c:zend_bitset_excl Line | Count | Source | 139 | 931k | { | 140 | 931k | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 141 | 931k | } |
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 | 126k | { | 140 | 126k | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 141 | 126k | } |
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.11M | { | 140 | 1.11M | set[ZEND_BITSET_ELM_NUM(n)] &= ~(Z_UL(1) << ZEND_BITSET_BIT_NUM(n)); | 141 | 1.11M | } |
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 | 425k | { |
145 | 425k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); |
146 | 425k | } 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 | 211k | { | 145 | 211k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 146 | 211k | } |
compact_vars.c:zend_bitset_clear Line | Count | Source | 144 | 47.7k | { | 145 | 47.7k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 146 | 47.7k | } |
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 | 47.7k | { | 145 | 47.7k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 146 | 47.7k | } |
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 | 4.88k | { | 145 | 4.88k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 146 | 4.88k | } |
zend_dfg.c:zend_bitset_clear Line | Count | Source | 144 | 38.0k | { | 145 | 38.0k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 146 | 38.0k | } |
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 | 38.7k | { | 145 | 38.7k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 146 | 38.7k | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_clear zend_ssa.c:zend_bitset_clear Line | Count | Source | 144 | 37.1k | { | 145 | 37.1k | memset(set, 0, len * ZEND_BITSET_ELM_SIZE); | 146 | 37.1k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_clear |
147 | | |
148 | | static inline bool zend_bitset_empty(zend_bitset set, uint32_t len) |
149 | 1.15M | { |
150 | 1.15M | uint32_t i; |
151 | 5.91M | for (i = 0; i < len; i++) { |
152 | 5.49M | if (set[i]) { |
153 | 742k | return 0; |
154 | 742k | } |
155 | 5.49M | } |
156 | 417k | return 1; |
157 | 1.15M | } 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 | 84.9k | { | 150 | 84.9k | uint32_t i; | 151 | 169k | for (i = 0; i < len; i++) { | 152 | 90.0k | if (set[i]) { | 153 | 5.97k | return 0; | 154 | 5.97k | } | 155 | 90.0k | } | 156 | 78.9k | return 1; | 157 | 84.9k | } |
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 | 225k | { | 150 | 225k | uint32_t i; | 151 | 414k | for (i = 0; i < len; i++) { | 152 | 227k | if (set[i]) { | 153 | 38.9k | return 0; | 154 | 38.9k | } | 155 | 227k | } | 156 | 186k | return 1; | 157 | 225k | } |
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 | 163k | { | 150 | 163k | uint32_t i; | 151 | 201k | for (i = 0; i < len; i++) { | 152 | 164k | if (set[i]) { | 153 | 126k | return 0; | 154 | 126k | } | 155 | 164k | } | 156 | 37.1k | return 1; | 157 | 163k | } |
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 | 578k | { | 150 | 578k | uint32_t i; | 151 | 4.78M | for (i = 0; i < len; i++) { | 152 | 4.75M | if (set[i]) { | 153 | 541k | return 0; | 154 | 541k | } | 155 | 4.75M | } | 156 | 37.1k | return 1; | 157 | 578k | } |
Unexecuted instantiation: zend_optimizer.c:zend_bitset_empty zend_ssa.c:zend_bitset_empty Line | Count | Source | 149 | 106k | { | 150 | 106k | uint32_t i; | 151 | 338k | for (i = 0; i < len; i++) { | 152 | 260k | if (set[i]) { | 153 | 28.8k | return 0; | 154 | 28.8k | } | 155 | 260k | } | 156 | 77.6k | return 1; | 157 | 106k | } |
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 | 126k | { |
166 | 126k | return memcmp(set1, set2, len * ZEND_BITSET_ELM_SIZE) == 0; |
167 | 126k | } 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 | 126k | { | 166 | 126k | return memcmp(set1, set2, len * ZEND_BITSET_ELM_SIZE) == 0; | 167 | 126k | } |
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 | 334k | { |
171 | 334k | memcpy(set1, set2, len * ZEND_BITSET_ELM_SIZE); |
172 | 334k | } 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 | 154k | { | 171 | 154k | memcpy(set1, set2, len * ZEND_BITSET_ELM_SIZE); | 172 | 154k | } |
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 | 180k | { | 171 | 180k | memcpy(set1, set2, len * ZEND_BITSET_ELM_SIZE); | 172 | 180k | } |
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 | 134k | { |
185 | 134k | uint32_t i; |
186 | | |
187 | 742k | for (i = 0; i < len; i++) { |
188 | 608k | set1[i] |= set2[i]; |
189 | 608k | } |
190 | 134k | } 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 | 61.5k | { | 185 | 61.5k | uint32_t i; | 186 | | | 187 | 280k | for (i = 0; i < len; i++) { | 188 | 219k | set1[i] |= set2[i]; | 189 | 219k | } | 190 | 61.5k | } |
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 | 44.8k | { | 185 | 44.8k | uint32_t i; | 186 | | | 187 | 257k | for (i = 0; i < len; i++) { | 188 | 212k | set1[i] |= set2[i]; | 189 | 212k | } | 190 | 44.8k | } |
Unexecuted instantiation: zend_dump.c:zend_bitset_union Unexecuted instantiation: zend_func_info.c:zend_bitset_union Unexecuted instantiation: zend_inference.c:zend_bitset_union Unexecuted instantiation: zend_optimizer.c:zend_bitset_union zend_ssa.c:zend_bitset_union Line | Count | Source | 184 | 27.6k | { | 185 | 27.6k | uint32_t i; | 186 | | | 187 | 203k | for (i = 0; i < len; i++) { | 188 | 176k | set1[i] |= set2[i]; | 189 | 176k | } | 190 | 27.6k | } |
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 | 112k | { |
203 | 112k | uint32_t i; |
204 | | |
205 | 603k | for (i = 0; i < len; i++) { |
206 | 491k | set1[i] = set2[i] | (set3[i] & set4[i]); |
207 | 491k | } |
208 | 112k | } 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 | 112k | { | 203 | 112k | uint32_t i; | 204 | | | 205 | 603k | for (i = 0; i < len; i++) { | 206 | 491k | set1[i] = set2[i] | (set3[i] & set4[i]); | 207 | 491k | } | 208 | 112k | } |
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 | 126k | { |
212 | 126k | uint32_t i; |
213 | | |
214 | 585k | for (i = 0; i < len; i++) { |
215 | 459k | set1[i] = set2[i] | (set3[i] & ~set4[i]); |
216 | 459k | } |
217 | 126k | } 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 | 126k | { | 212 | 126k | uint32_t i; | 213 | | | 214 | 585k | for (i = 0; i < len; i++) { | 215 | 459k | set1[i] = set2[i] | (set3[i] & ~set4[i]); | 216 | 459k | } | 217 | 126k | } |
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 | 63.6k | { |
221 | 63.6k | uint32_t i; |
222 | | |
223 | 259k | for (i = 0; i < len; i++) { |
224 | 223k | if (set1[i] & ~set2[i]) { |
225 | 27.6k | return 0; |
226 | 27.6k | } |
227 | 223k | } |
228 | 35.9k | return 1; |
229 | 63.6k | } 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 | 63.6k | { | 221 | 63.6k | uint32_t i; | 222 | | | 223 | 259k | for (i = 0; i < len; i++) { | 224 | 223k | if (set1[i] & ~set2[i]) { | 225 | 27.6k | return 0; | 226 | 27.6k | } | 227 | 223k | } | 228 | 35.9k | return 1; | 229 | 63.6k | } |
Unexecuted instantiation: zend_alloc.c:zend_bitset_subset |
230 | | |
231 | | static inline int zend_bitset_first(zend_bitset set, uint32_t len) |
232 | 903k | { |
233 | 903k | uint32_t i; |
234 | | |
235 | 5.93M | for (i = 0; i < len; i++) { |
236 | 5.76M | if (set[i]) { |
237 | 737k | return ZEND_BITSET_ELM_SIZE * 8 * i + zend_ulong_ntz(set[i]); |
238 | 737k | } |
239 | 5.76M | } |
240 | 165k | return -1; /* empty set */ |
241 | 903k | } 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 | 130k | { | 233 | 130k | uint32_t i; | 234 | | | 235 | 794k | for (i = 0; i < len; i++) { | 236 | 745k | if (set[i]) { | 237 | 81.5k | return ZEND_BITSET_ELM_SIZE * 8 * i + zend_ulong_ntz(set[i]); | 238 | 81.5k | } | 239 | 745k | } | 240 | 49.1k | return -1; /* empty set */ | 241 | 130k | } |
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 | 231k | { | 233 | 231k | uint32_t i; | 234 | | | 235 | 419k | for (i = 0; i < len; i++) { | 236 | 302k | if (set[i]) { | 237 | 114k | return ZEND_BITSET_ELM_SIZE * 8 * i + zend_ulong_ntz(set[i]); | 238 | 114k | } | 239 | 302k | } | 240 | 116k | return -1; /* empty set */ | 241 | 231k | } |
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 | 541k | { | 233 | 541k | uint32_t i; | 234 | | | 235 | 4.71M | for (i = 0; i < len; i++) { | 236 | 4.71M | if (set[i]) { | 237 | 541k | return ZEND_BITSET_ELM_SIZE * 8 * i + zend_ulong_ntz(set[i]); | 238 | 541k | } | 239 | 4.71M | } | 240 | 0 | return -1; /* empty set */ | 241 | 541k | } |
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 | 126k | { |
245 | 126k | uint32_t i = len; |
246 | | |
247 | 220k | while (i > 0) { |
248 | 220k | i--; |
249 | 220k | if (set[i]) { |
250 | 126k | int j = ZEND_BITSET_ELM_SIZE * 8 * i - 1; |
251 | 126k | zend_ulong x = set[i]; |
252 | 1.87M | while (x != Z_UL(0)) { |
253 | 1.74M | x = x >> Z_UL(1); |
254 | 1.74M | j++; |
255 | 1.74M | } |
256 | 126k | return j; |
257 | 126k | } |
258 | 220k | } |
259 | 0 | return -1; /* empty set */ |
260 | 126k | } 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 | 126k | { | 245 | 126k | uint32_t i = len; | 246 | | | 247 | 220k | while (i > 0) { | 248 | 220k | i--; | 249 | 220k | if (set[i]) { | 250 | 126k | int j = ZEND_BITSET_ELM_SIZE * 8 * i - 1; | 251 | 126k | zend_ulong x = set[i]; | 252 | 1.87M | while (x != Z_UL(0)) { | 253 | 1.74M | x = x >> Z_UL(1); | 254 | 1.74M | j++; | 255 | 1.74M | } | 256 | 126k | return j; | 257 | 126k | } | 258 | 220k | } | 259 | 0 | return -1; /* empty set */ | 260 | 126k | } |
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 | 397k | #define ZEND_BITSET_FOREACH(set, len, bit) do { \ |
263 | 397k | zend_bitset _set = (set); \ |
264 | 397k | uint32_t _i, _len = (len); \ |
265 | 1.25M | for (_i = 0; _i < _len; _i++) { \ |
266 | 855k | zend_ulong _x = _set[_i]; \ |
267 | 855k | if (_x) { \ |
268 | 177k | (bit) = ZEND_BITSET_ELM_SIZE * 8 * _i; \ |
269 | 4.16M | for (; _x != 0; _x >>= Z_UL(1), (bit)++) { \ |
270 | 3.98M | if (!(_x & Z_UL(1))) continue; |
271 | | |
272 | 28.8k | #define ZEND_BITSET_REVERSE_FOREACH(set, len, bit) do { \ |
273 | 28.8k | zend_bitset _set = (set); \ |
274 | 28.8k | uint32_t _i = (len); \ |
275 | 28.8k | zend_ulong _test = Z_UL(1) << (ZEND_BITSET_ELM_SIZE * 8 - 1); \ |
276 | 206k | while (_i-- > 0) { \ |
277 | 177k | zend_ulong _x = _set[_i]; \ |
278 | 177k | if (_x) { \ |
279 | 40.3k | (bit) = ZEND_BITSET_ELM_SIZE * 8 * (_i + 1) - 1; \ |
280 | 2.14M | for (; _x != 0; _x <<= Z_UL(1), (bit)--) { \ |
281 | 2.10M | if (!(_x & _test)) continue; \ |
282 | | |
283 | | #define ZEND_BITSET_FOREACH_END() \ |
284 | 640k | } \ |
285 | 217k | } \ |
286 | 1.03M | } \ |
287 | 426k | } while (0) |
288 | | |
289 | 361k | static inline int zend_bitset_pop_first(zend_bitset set, uint32_t len) { |
290 | 361k | int i = zend_bitset_first(set, len); |
291 | 361k | if (i >= 0) { |
292 | 195k | zend_bitset_excl(set, i); |
293 | 195k | } |
294 | 361k | return i; |
295 | 361k | } 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 | 130k | static inline int zend_bitset_pop_first(zend_bitset set, uint32_t len) { | 290 | 130k | int i = zend_bitset_first(set, len); | 291 | 130k | if (i >= 0) { | 292 | 81.5k | zend_bitset_excl(set, i); | 293 | 81.5k | } | 294 | 130k | return i; | 295 | 130k | } |
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 | 231k | static inline int zend_bitset_pop_first(zend_bitset set, uint32_t len) { | 290 | 231k | int i = zend_bitset_first(set, len); | 291 | 231k | if (i >= 0) { | 292 | 114k | zend_bitset_excl(set, i); | 293 | 114k | } | 294 | 231k | return i; | 295 | 231k | } |
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_ */ |