Implement SIMD latest opcodes and update LLVM to 13.0 (#758)

Implement the latest SIMD opcodes and update LLVM 13.0,
update the llvm build scripts, update the sample workloads‘ build scripts,
and build customized wasi-sdk to build some workloads.
Also refine the CI rules.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
Wenyong Huang
2021-09-17 19:12:57 +08:00
committed by GitHub
parent 7e60a5db8d
commit 7be0d385a6
82 changed files with 5266 additions and 4698 deletions

View File

@ -5,6 +5,8 @@ cmake_minimum_required (VERSION 3.0)
project(bwa_wasm C)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/preparation.cmake)
################ LIBZ ################
set(LIBZ_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../libz)
add_library(z_wasm STATIC
@ -86,16 +88,15 @@ set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME bwa.wasm)
target_include_directories(${PROJECT_NAME}
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/../include
${CMAKE_CURRENT_SOURCE_DIR}/../include/SSE
${CMAKE_CURRENT_SOURCE_DIR}/../include/pthread
${WASI_SDK_HOME}/share/wasi-sysroot/include/libc/musl
${WASI_SDK_HOME}/share/wasi-sysroot/include/sse
)
target_compile_definitions(${PROJECT_NAME}
PRIVATE
USE_MALLOC_WRAPPERS
__SSE__ __SSE2__ __SSE4_1__
_WASI_EMULATED_MMAN _WASI_EMULATED_SIGNAL
_WASI_EMULATED_MMAN _WASI_EMULATED_SIGNAL _WASI_EMULATED_PROCESS_CLOCKS
)
target_compile_options(${PROJECT_NAME}
@ -112,16 +113,7 @@ target_link_options(${PROJECT_NAME}
LINKER:-z,stack-size=1048576
)
target_link_libraries(${PROJECT_NAME} z_wasm)
find_program(WASM_OPT
NAMES wasm-opt
PATHS /opt/binaryen-version_97/bin /opt/binaryen/bin
)
if (NOT WASM_OPT)
message(WARNING "can not find wasm-opt and will not optimize any wasm module")
endif()
target_link_libraries(${PROJECT_NAME} z_wasm wasi-emulated-process-clocks)
add_custom_target(bwa_wasm_opt ALL
COMMAND