Skip to content

Commit

Permalink
fix pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
m-atalla committed Jun 28, 2024
1 parent 0a7cf98 commit cc6f3f5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ seed_embeddings/preprocessed/*

html
latex
sqlite3.ll
sqlite3.ll
22 changes: 11 additions & 11 deletions src/test-suite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,40 @@ file(COPY test-lit.py DESTINATION ./)
file(COPY test-ir2vec.lit DESTINATION ./)

# SQLite IR file is added along side other PE-benchmarks for this version
set(SQLITE_LLVM_IR
set(SQLITE_LLVM_IR
${CMAKE_CURRENT_SOURCE_DIR}/PE-benchmarks-llfiles-llvm17/sqlite3.ll
)

if(NOT EXISTS ${SQLITE_LLVM_IR})
# The downloaded Zip file and source files directory are located at the
# The downloaded Zip file and source files directory are located at the
# build directory since its already gitignore anyways.
set(SQLITE_ZIP ${CMAKE_CURRENT_BINARY_DIR}/sqlite-amalgamation-3460000.zip)
set(SQLITE_SOURCE ${CMAKE_CURRENT_BINARY_DIR}/sqlite-amalgamation-3460000)

# Some of the recommended compile flags. https://sqlite.org/amalgamation.html
# with the following flags the resulting LLVM IR file is about 500k lines
set(SQLITE_COMPILE_FLAGS
set(SQLITE_COMPILE_FLAGS
-DSQLITE_ENABLE_FTS3
-DSQLITE_ENABLE_FTS5
-DSQLITE_ENABLE_RTREE
-DSQLITE_ENABLE_DBSTAT_VTAB
-DSQLITE_ENABLE_RBU
-DSQLITE_ENABLE_SESSION
-DSQLITE_ENABLE_SESSION
)

if(NOT EXISTS ${SQLITE_ZIP})
# SQLite Amalgamation download source: https://sqlite.org/download.html
message(STATUS "Downloading SQLite Amalgamation source zip file..")
file(
DOWNLOAD https://sqlite.org/2024/sqlite-amalgamation-3460000.zip
${SQLITE_ZIP}
EXPECTED_HASH SHA3_256=1221eed70de626871912bfca144c00411f0c30d3c2b7935cff3963b63370ef7c
${SQLITE_ZIP}
EXPECTED_HASH SHA3_256=1221eed70de626871912bfca144c00411f0c30d3c2b7935cff3963b63370ef7c
SHOW_PROGRESS
)
endif()

if(NOT EXISTS ${SQLITE_SOURCE})
message(STATUS
message(STATUS
"Unzipping SQLite source files at: ${SQLITE_SOURCE}"
)
execute_process(
Expand All @@ -63,14 +63,14 @@ if(NOT EXISTS ${SQLITE_LLVM_IR})
endif()

execute_process(
COMMAND ${CLANG_BIN} -S -emit-llvm ${SQLITE_COMPILE_FLAGS}
-Xclang -disable-O0-optnone
-o ${SQLITE_LLVM_IR}
COMMAND ${CLANG_BIN} -S -emit-llvm ${SQLITE_COMPILE_FLAGS}
-Xclang -disable-O0-optnone
-o ${SQLITE_LLVM_IR}
${SQLITE_SOURCE}/sqlite3.c
RESULT_VARIABLE sqlite_ir_result
)

if(sqlite_ir_result EQUAL 0)
message(STATUS "SQLite benchmark was generated at: ${SQLITE_LLVM_IR}")
endif()
endif()
endif()

0 comments on commit cc6f3f5

Please sign in to comment.