svf-lib 1.0.2062 → 1.0.2064
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SVF-linux/Release-build/bin/ae +0 -0
- package/SVF-linux/Release-build/bin/cfl +0 -0
- package/SVF-linux/Release-build/bin/dvf +0 -0
- package/SVF-linux/Release-build/bin/llvm2svf +0 -0
- package/SVF-linux/Release-build/bin/mta +0 -0
- package/SVF-linux/Release-build/bin/saber +0 -0
- package/SVF-linux/Release-build/bin/svf-ex +0 -0
- package/SVF-linux/Release-build/bin/wpa +0 -0
- package/SVF-linux/Release-build/include/Util/SparseBitVector.h +42 -0
- package/SVF-linux/Release-build/lib/libSvfCore.a +0 -0
- package/SVF-linux/Release-build/lib/libSvfLLVM.a +0 -0
- package/SVF-osx/Release-build/lib/libSvfCore.a +0 -0
- package/SVF-osx/Release-build/lib/libSvfLLVM.a +0 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -20,9 +20,13 @@
|
|
|
20
20
|
#ifdef __has_builtin
|
|
21
21
|
# define HAS_CLZ __has_builtin(__builtin_clz)
|
|
22
22
|
# define HAS_CLZLL __has_builtin(__builtin_clzll)
|
|
23
|
+
# define HAS_CTZ __has_builtin(__builtin_ctz)
|
|
24
|
+
# define HAS_CTZLL __has_builtin(__builtin_ctzll)
|
|
23
25
|
#else
|
|
24
26
|
# define HAS_CLZ 0
|
|
25
27
|
# define HAS_CLZLL 0
|
|
28
|
+
# define HAS_CLZ 0
|
|
29
|
+
# define HAS_CLZLL 0
|
|
26
30
|
#endif
|
|
27
31
|
|
|
28
32
|
namespace SVF
|
|
@@ -66,6 +70,44 @@ template <typename T, std::size_t SizeOfT> struct TrailingZerosCounter
|
|
|
66
70
|
}
|
|
67
71
|
};
|
|
68
72
|
|
|
73
|
+
#if defined(__GNUC__) || defined(_MSC_VER)
|
|
74
|
+
template <typename T> struct TrailingZerosCounter<T, 4>
|
|
75
|
+
{
|
|
76
|
+
static unsigned count(T Val, ZeroBehavior)
|
|
77
|
+
{
|
|
78
|
+
if (Val == 0)
|
|
79
|
+
return 32;
|
|
80
|
+
|
|
81
|
+
#if HAS_CTZ || defined(__GNUC__)
|
|
82
|
+
return __builtin_ctz(Val);
|
|
83
|
+
#elif defined(_MSC_VER)
|
|
84
|
+
unsigned long Index;
|
|
85
|
+
_BitScanForward(&Index, Val);
|
|
86
|
+
return Index;
|
|
87
|
+
#endif
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
#if !defined(_MSC_VER) || defined(_M_X64)
|
|
92
|
+
template <typename T> struct TrailingZerosCounter<T, 8>
|
|
93
|
+
{
|
|
94
|
+
static unsigned count(T Val, ZeroBehavior)
|
|
95
|
+
{
|
|
96
|
+
if (Val == 0)
|
|
97
|
+
return 64;
|
|
98
|
+
|
|
99
|
+
#if HAS_CTZLL || defined(__GNUC__)
|
|
100
|
+
return __builtin_ctzll(Val);
|
|
101
|
+
#elif defined(_MSC_VER)
|
|
102
|
+
unsigned long Index;
|
|
103
|
+
_BitScanForward64(&Index, Val);
|
|
104
|
+
return Index;
|
|
105
|
+
#endif
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
#endif
|
|
109
|
+
#endif
|
|
110
|
+
|
|
69
111
|
/// Count number of 0's from the least significant bit to the most
|
|
70
112
|
/// stopping at the first 1.
|
|
71
113
|
///
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|