svf-tools 1.0.968 → 1.0.970
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.970",
|
|
4
4
|
"description": "* <b>[TypeClone](https://github.com/SVF-tools/SVF/wiki/TypeClone) published in our [ECOOP paper](https://yuleisui.github.io/publications/ecoop20.pdf) is now available in SVF </b> * <b>SVF now uses a single script for its build. Just type [`source ./build.sh`](https://github.com/SVF-tools/SVF/blob/master/build.sh) in your terminal, that's it!</b> * <b>SVF now supports LLVM-10.0.0! </b> * <b>We thank [bsauce](https://github.com/bsauce) for writing a user manual of SVF ([link1](https://www.jianshu.com/p/068a08ec749c) and [link2](https://www.jianshu.com/p/777c30d4240e)) in Chinese </b> * <b>SVF now supports LLVM-9.0.0 (Thank [Byoungyoung Lee](https://github.com/SVF-tools/SVF/issues/142) for his help!). </b> * <b>SVF now supports a set of [field-sensitive pointer analyses](https://yuleisui.github.io/publications/sas2019a.pdf). </b> * <b>[Use SVF as an external lib](https://github.com/SVF-tools/SVF/wiki/Using-SVF-as-a-lib-in-your-own-tool) for your own project (Contributed by [Hongxu Chen](https://github.com/HongxuChen)). </b> * <b>SVF now supports LLVM-7.0.0. </b> * <b>SVF now supports Docker. [Try SVF in Docker](https://github.com/SVF-tools/SVF/wiki/Try-SVF-in-Docker)! </b> * <b>SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). </b> * <b>SVF now supports [LLVM-4.0.0](https://github.com/svf-tools/SVF/pull/23) (Contributed by Jared Carlson. Thank [Jared](https://github.com/jcarlson23) and [Will](https://github.com/dtzWill) for their in-depth [discussions](https://github.com/svf-tools/SVF/pull/18) about updating SVF!) </b> * <b>SVF now supports analysis for C++ programs.</b> <br />",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -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
|
///
|