summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2023-10-20 21:15:27 +0200
committerGitHub <noreply@github.com>2023-10-20 21:15:27 +0200
commit1c910bf047c058c4c97f65293ff539b4caf9ee87 (patch)
treeb8731c01e52caf96bff8a127b2198a0195db5811 /src/analysis
parentb83d8679a7641312f09380e1cef0e56ceb341d18 (diff)
downloadbinaryen-1c910bf047c058c4c97f65293ff539b4caf9ee87.tar.gz
binaryen-1c910bf047c058c4c97f65293ff539b4caf9ee87.tar.bz2
binaryen-1c910bf047c058c4c97f65293ff539b4caf9ee87.zip
[analysis][NFC] Remove unused sign-lattice.cpp (#6029)
There is no header for this source file and its contents are not used anywhere. It will be easy to reintroduce the sign lattice in the future if we need it.
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/CMakeLists.txt1
-rw-r--r--src/analysis/sign-lattice.cpp45
2 files changed, 0 insertions, 46 deletions
diff --git a/src/analysis/CMakeLists.txt b/src/analysis/CMakeLists.txt
index 7895e5af8..313eec0d5 100644
--- a/src/analysis/CMakeLists.txt
+++ b/src/analysis/CMakeLists.txt
@@ -1,7 +1,6 @@
file(GLOB analysis_HEADERS *.h lattices/*.h)
set(analysis_SOURCES
cfg.cpp
- sign-lattice.cpp
${analysis_HEADERS}
)
add_library(analysis OBJECT ${analysis_SOURCES})
diff --git a/src/analysis/sign-lattice.cpp b/src/analysis/sign-lattice.cpp
deleted file mode 100644
index 0d9379938..000000000
--- a/src/analysis/sign-lattice.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "lattice.h"
-#include <type_traits>
-
-namespace wasm::analysis {
-
-struct SignLattice {
-public:
- enum Sign { BOTTOM, NEGATIVE, ZERO, POSITIVE, TOP };
-
-private:
- Sign value;
-
-public:
- bool isTop() { return value == TOP; }
-
- bool isBottom() { return value == BOTTOM; }
-
- static LatticeComparison compare(const SignLattice& left,
- const SignLattice& right) {
- if (left.value == right.value) {
- return EQUAL;
- } else if (left.value == BOTTOM || right.value == TOP) {
- return LESS;
- } else if (left.value == TOP || right.value == BOTTOM) {
- return GREATER;
- } else {
- return NO_RELATION;
- }
- }
-
- // Modifies the left lattice element to the least upper bound between
- // it and the right hand lattice element in-place. Returns true
- // if the left lattice element has been changed.
- void getLeastUpperBound(const SignLattice& right) {
- if (value == right.value || value == TOP || right.value == BOTTOM) {
- return;
- } else if (value == BOTTOM || right.value == TOP) {
- value = right.value;
- } else {
- value = TOP;
- }
- }
-};
-
-} // namespace wasm::analysis