Ignore:
Timestamp:
Jul 31, 2014, 1:39:48 PM (5 years ago)
Author:
linmengl
Message:

add avx2 support in cmake

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib_ir/CMakeLists.txt

    r3927 r3936  
    22project (IR_Library)
    33
    4 set(CXX_SSE_FLAGS "-msse2 -march=pentium4")
     4option (USE_AVX2 "Compile for Haswell arch with AVX2, BMI, BMI2")
     5if (USE_AVX2)
     6    message("---- Compiling for AVX2")
     7    set(CXX_SSE_FLAGS "-march=core-avx2")
     8    set(LLVM_SSE_FLAGS "-mattr=+sse,+sse2,+avx2,+bmi2,+bmi")
     9else (USE_AVX2)
     10    set(CXX_SSE_FLAGS "-msse2")
     11    set(LLVM_SSE_FLAGS "-mattr=+sse,+sse2")
     12endif (USE_AVX2)
     13
    514# perf_flags for xmlwf perf script
    615set(CXX_PERF_FLAGS "-DBUFFER_PROFILING -DPERF_SCRIPT")
     
    1019set(LLVM_LLC "llc-svn")
    1120
    12 set(LLVM_SSE_FLAGS "-mattr=+sse,+sse2,-avx,-avx2,-sse3,-sse4.1,-sse4.2,-sse4a,-ssse3")
    1321set(LLVM_LLC_FLAGS )#-x86-experimental-vector-shuffle-lowering)
    1422
Note: See TracChangeset for help on using the changeset viewer.