Skip to content

Commit 967a6b3

Browse files
Add Logging to AVX instructions
1 parent 7d05a3a commit 967a6b3

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,19 @@ file(GLOB ARGPARSE_FILES ${CMAKE_SOURCE_DIR}/argparse/*.cpp)
6262

6363
add_executable(next ${SRC_FILES} ${ARGPARSE_FILES})
6464

65+
option(ENABLE_VEC_REPORT "Enable compiler vectorization reports" ON)
66+
67+
if(ENABLE_VEC_REPORT)
68+
if(CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
69+
target_compile_options(next PRIVATE -O3 -Rpass=loop-vectorize -Rpass-missed=loop-vectorize)
70+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
71+
target_compile_options(next PRIVATE -O3 -fopt-info-vec-optimized -fopt-info-vec-missed)
72+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
73+
target_compile_options(next PRIVATE -O3 -Rpass=loop-vectorize -Rpass-missed=loop-vectorize)
74+
endif()
75+
endif()
76+
77+
6578
# ============================
6679
# OpenMP
6780
# ============================

0 commit comments

Comments
 (0)