Skip to content

Commit

Permalink
- Implement Z3 expression optimization based on idea from SLOT(https:…
Browse files Browse the repository at this point in the history
…//github.com/mikekben/SLOT)

SMT(LLVM(original_expression - simplified_expression) != 0) (Thanks @Matteo) which gives a nice boost for Z3
- Fix regression introduced with update to llvm 19 (Missed opcodes)
- Replace PassManager with new PassManager
  • Loading branch information
adam weishaupt committed Sep 25, 2024
1 parent 133649c commit ad88f63
Show file tree
Hide file tree
Showing 5 changed files with 218 additions and 96 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ list(APPEND PROJECT_LIBRARIES ${LLVM_LIBS})
list(APPEND PROJECT_DEFINITIONS ${LLVM_DEFINITIONS})
list(APPEND PROJECT_INCLUDEDIRECTORIES ${LLVM_INCLUDE_DIRS})

# set CXX flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -pipe -fomit-frame-pointer -march=native")
# set CXX flags for release
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -pipe -fomit-frame-pointer -march=native")
endif()

add_executable(SiMBA++ "CSiMBA.cpp" "CSiMBA.h" "LLVMParser.cpp" "LLVMParser.h" "Simplifier.h" "MBAChecker.cpp" "MBAChecker.h" "Simplifier.cpp" "ShuttingYard.cpp" "Modulo.cpp" "Modulo.h" "Z3Prover.cpp" "Z3Prover.h")

Expand All @@ -104,6 +106,7 @@ target_link_libraries(SiMBA++
LLVMBitReader
LLVMCore
LLVMSupport
LLVMPasses
${Z3_LIBRARIES}
)

Expand Down
4 changes: 2 additions & 2 deletions CSiMBA.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

namespace LSiMBA {

#define VERSION_MAJOR 1
#define VERSION_MINOR 2
#define VERSION_MAJOR 2
#define VERSION_MINOR 0

/**
* The number of test cases to use for the verification.
Expand Down
Loading

0 comments on commit ad88f63

Please sign in to comment.