[test-suite] r255878 - cmake/lit: Add SPEC CPU95

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 20:59:55 PST 2015


Author: matze
Date: Wed Dec 16 22:59:55 2015
New Revision: 255878

URL: http://llvm.org/viewvc/llvm-project?rev=255878&view=rev
Log:
cmake/lit: Add SPEC CPU95

This adds the C tests from SPEC CPU95, no support for the fortran tests.

Added:
    test-suite/trunk/External/SPEC/CINT95/099.go/CMakeLists.txt
    test-suite/trunk/External/SPEC/CINT95/124.m88ksim/CMakeLists.txt
    test-suite/trunk/External/SPEC/CINT95/126.gcc/CMakeLists.txt
    test-suite/trunk/External/SPEC/CINT95/129.compress/CMakeLists.txt
    test-suite/trunk/External/SPEC/CINT95/130.li/CMakeLists.txt
    test-suite/trunk/External/SPEC/CINT95/132.ijpeg/CMakeLists.txt
    test-suite/trunk/External/SPEC/CINT95/134.perl/CMakeLists.txt
    test-suite/trunk/External/SPEC/CINT95/147.vortex/CMakeLists.txt
    test-suite/trunk/External/SPEC/CINT95/CMakeLists.txt
Modified:
    test-suite/trunk/External/SPEC/CMakeLists.txt

Added: test-suite/trunk/External/SPEC/CINT95/099.go/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT95/099.go/CMakeLists.txt?rev=255878&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT95/099.go/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT95/099.go/CMakeLists.txt Wed Dec 16 22:59:55 2015
@@ -0,0 +1,19 @@
+macro(test_input run_type input output size0 size1)
+  llvm_test_run(RUN_TYPE ${run_type}
+    ${size0} ${size1} ${input}
+    > ${CMAKE_CURRENT_BINARY_DIR}/${output}
+    WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input
+  )
+  llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
+    ${BENCHMARK_DIR}/data/${run_type}/output/${output}
+    ${CMAKE_CURRENT_BINARY_DIR}/${output}
+  )
+endmacro()
+
+test_input(test null.in null.out 40 19)
+test_input(train 2stone9.in 2stone9.out 50 9)
+test_input(ref 5stone21.in 5stone21.out 50 21)
+test_input(ref 9stone21.in 9stone21.out 50 21)
+test_input(ref null.in null.out 50 21)
+
+llvm_multisource()

Added: test-suite/trunk/External/SPEC/CINT95/124.m88ksim/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT95/124.m88ksim/CMakeLists.txt?rev=255878&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT95/124.m88ksim/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT95/124.m88ksim/CMakeLists.txt Wed Dec 16 22:59:55 2015
@@ -0,0 +1,128 @@
+include(TestBigEndian)
+if(IS_BIGENDIAN)
+  set(CTLFILE "ctl.big")
+else()
+  set(CTLFILE "ctl.lit")
+  add_definitions(-DLEHOST)
+endif()
+
+set(SourceNames
+  addd.c
+  adds.c
+  alignd.c
+  aligns.c
+  asm.c
+  asmcmdstr.c
+  bf.c
+  bm.c
+  br.c
+  bs.c
+  ckiob.c
+  classify.c
+  cm.c
+  cmdparser.c
+  cmdstruct.c
+  cmmu.c
+  cmmu_atc.c
+  cmmu_cache.c
+  cmmu_ctl.c
+  cmmu_debug.c
+  cmmu_func.c
+  cmmu_init.c
+  converters.c
+  ctlregs.c
+  dc.c
+  dis.c
+  divd.c
+  divs.c
+  dmem.c
+  dpath.c
+  fadd.c
+  fadd64.c
+  fadds.c
+  fcdi.c
+  fcds.c
+  fcid.c
+  fcis.c
+  fcmp.c
+  fcmp64.c
+  fcmps.c
+  fcsd.c
+  fcsi.c
+  fdiv.c
+  fdiv64.c
+  fdivs.c
+  floaterr.c
+  flt.c
+  fmul.c
+  fmul64.c
+  fmuls.c
+  fpunimp.c
+  fsub.c
+  fsub64.c
+  fsubs.c
+  go.c
+  he.c
+  id.c
+  instab.c
+  int.c
+  interface.c
+  lo.c
+  main.c
+  map.c
+  md.c
+  mem.c
+  mm.c
+  multd.c
+  mults.c
+  normalized.c
+  normalizes.c
+  opn_output.c
+  pc.c
+  rd.c
+  reserved.c
+  reserves.c
+  returnd.c
+  returns.c
+  rm.c
+  round.c
+  roundd.c
+  rounds.c
+  runsim.c
+  sdsr.c
+  show.c
+  signals.c
+  sim_io.c
+  sim_printf.c
+  simload.c
+  simtime.c
+  stats.c
+  symbols.c
+  sysVbcs.c
+  sysface.c
+  table.c
+  trap.c
+  updstat.c
+)
+set(Source "")
+foreach(FILENAME ${SourceNames})
+  list(APPEND Source ${BENCHMARK_DIR}/src/${FILENAME})
+endforeach()
+
+macro(test_input run_type)
+  llvm_test_run(RUN_TYPE ${run_type}
+    -c < ${BENCHMARK_DIR}/data/${run_type}/input/${CTLFILE}
+    > ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out
+    WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input
+  )
+  llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
+    ${BENCHMARK_DIR}/data/${run_type}/output/${run_type}.out
+    ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out
+  )
+endmacro()
+
+test_input(test)
+test_input(train)
+test_input(ref)
+
+llvm_multisource()

Added: test-suite/trunk/External/SPEC/CINT95/126.gcc/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT95/126.gcc/CMakeLists.txt?rev=255878&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT95/126.gcc/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT95/126.gcc/CMakeLists.txt Wed Dec 16 22:59:55 2015
@@ -0,0 +1,26 @@
+add_definitions(-DSPEC)
+list(APPEND CPPFLAGS -idirafter ${BENCHMARK_DIR}/src/src.alt)
+
+macro(test_input run_type input output)
+  llvm_test_run(RUN_TYPE ${run_type}
+    -quiet -funroll-loops -fforce-mem -fcse-follow-jumps
+    -fcse-skip-blocks -fexpensive-optimizations -fstrength-reduce -fpeephole
+    -fschedule-insns -finline-functions -fschedule-insns2
+    -O ${BENCHMARK_DIR}/data/${run_type}/input/${input}
+    -o ${CMAKE_CURRENT_BINARY_DIR}/${output}
+  )
+  llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
+    ${BENCHMARK_DIR}/data/${run_type}/output/${output}
+    ${CMAKE_CURRENT_BINARY_DIR}/${output}
+  )
+endmacro()
+
+test_input(test cccp.i cccp.s)
+test_input(train amptjp.i amptjp.s)
+file(GLOB inputs "${BENCHMARK_DIR}/data/ref/input/*.i")
+foreach(input ${inputs})
+  get_filename_component(basename "${input}" NAME_WE)
+  test_input(ref ${basename}.o ${basename}.s)
+endforeach()
+
+llvm_multisource()

Added: test-suite/trunk/External/SPEC/CINT95/129.compress/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT95/129.compress/CMakeLists.txt?rev=255878&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT95/129.compress/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT95/129.compress/CMakeLists.txt Wed Dec 16 22:59:55 2015
@@ -0,0 +1,20 @@
+# iOS compiler have -Werror=return-value, need to disable this explicitely
+# (-w is not enough)
+list(APPEND CPPFLAGS -Wno-return-type)
+
+macro(test_input run_type input output)
+  llvm_test_run(RUN_TYPE ${run_type}
+    < ${BENCHMARK_DIR}/data/${run_type}/input/${input}
+    > ${CMAKE_CURRENT_BINARY_DIR}/${output}
+  )
+  llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
+    ${BENCHMARK_DIR}/data/${run_type}/output/${output}
+    ${CMAKE_CURRENT_BINARY_DIR}/${output}
+  )
+endmacro()
+
+test_input(test test.in test.out)
+test_input(train test.in test.out)
+test_input(ref bigtest.in bigtest.out)
+
+llvm_multisource()

Added: test-suite/trunk/External/SPEC/CINT95/130.li/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT95/130.li/CMakeLists.txt?rev=255878&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT95/130.li/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT95/130.li/CMakeLists.txt Wed Dec 16 22:59:55 2015
@@ -0,0 +1,24 @@
+# Work around usage of a reserved name (is* is reserved by the C standard and
+# isnumber is posix function)
+add_definitions(-Disnumber=my_isnumber)
+
+macro(test_input run_type)
+  llvm_test_run(RUN_TYPE ${run_type}
+    ${ARGN}
+    > ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out
+    WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input
+  )
+  llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
+    ${BENCHMARK_DIR}/data/${run_type}/output/${run_type}.out
+    ${CMAKE_CURRENT_BINARY_DIR}/${run_type}.out
+  )
+endmacro()
+
+test_input(test test.lsp)
+test_input(train train.lsp)
+test_input(ref au.lsp boyer.lsp browse.lsp ctak.lsp dderiv.lsp deriv.lsp
+               destru0.lsp destru1.lsp destru2.lsp destrum0.lsp
+               destrum1.lsp destrum2.lsp div2.lsp puzzle0.lsp puzzle1.lsp
+               tak0.lsp tak1.lsp tak2.lsp takr.lsp triang.lsp xit.lsp)
+
+llvm_multisource()

Added: test-suite/trunk/External/SPEC/CINT95/132.ijpeg/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT95/132.ijpeg/CMakeLists.txt?rev=255878&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT95/132.ijpeg/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT95/132.ijpeg/CMakeLists.txt Wed Dec 16 22:59:55 2015
@@ -0,0 +1,99 @@
+# This define leads to errno.h getting included
+add_definitions(-D__VMS)
+
+set(SourceNames
+  jcapi.c
+  jccoefct.c
+  jccolor.c
+  jcdctmgr.c
+  jchuff.c
+  jcmainct.c
+  jcmarker.c
+  jcmaster.c
+  jcomapi.c
+  jcparam.c
+  jcprepct.c
+  jcsample.c
+  jdapi.c
+  jdatadst.c
+  jdatasrc.c
+  jdcoefct.c
+  jdcolor.c
+  jddctmgr.c
+  jdhuff.c
+  jdmainct.c
+  jdmarker.c
+  jdmaster.c
+  jdmerge.c
+  jdpostct.c
+  jdsample.c
+  jerror.c
+  jfdctflt.c
+  jfdctfst.c
+  jfdctint.c
+  jidctflt.c
+  jidctfst.c
+  jidctint.c
+  jidctred.c
+  jmemmgr.c
+  jmemnobs.c
+  jquant1.c
+  jquant2.c
+  jutils.c
+  libpbm1.c
+  libpbm2.c
+  libpbm3.c
+  libpbm4.c
+  libpbm5.c
+  libpgm1.c
+  libpgm2.c
+  libppm1.c
+  libppm2.c
+  libppm3.c
+  libppm4.c
+  libppm5.c
+  rdbmp.c
+  rdgif.c
+  rdppm.c
+  rdtarga.c
+  spec_image.c
+  spec_jmemdst.c
+  spec_jmemsrc.c
+  spec_main.c
+  wrbmp.c
+  wrgif.c
+  wrppm.c
+  wrtarga.c
+)
+set(Source "")
+foreach(FILENAME ${SourceNames})
+  list(APPEND Source ${BENCHMARK_DIR}/src/${FILENAME})
+endforeach()
+
+macro(test_input run_type input output)
+  llvm_test_run(RUN_TYPE ${run_type}
+    -image_file ${input}
+    -compression.quality 90
+    -compression.optimize_coding 0
+    -compression.smoothing_factor 90
+    -difference.image 1
+    -difference.x_stride 10
+    -difference.y_stride 10
+    -verbose 1
+    -GO.findoptcomp
+    > ${CMAKE_CURRENT_BINARY_DIR}/${output}
+    WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input
+  )
+  llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
+    ${BENCHMARK_DIR}/data/${run_type}/output/${output}
+    ${CMAKE_CURRENT_BINARY_DIR}/${output}
+  )
+endmacro()
+
+test_input(test specmun.ppm specmun.out)
+test_input(train vigo.ppm vigo.out)
+test_input(ref penguin.ppm penguin.out)
+test_input(ref specmun.ppm specmun.out)
+test_input(ref vigo.ppm vigo.out)
+
+llvm_multisource()

Added: test-suite/trunk/External/SPEC/CINT95/134.perl/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT95/134.perl/CMakeLists.txt?rev=255878&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT95/134.perl/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT95/134.perl/CMakeLists.txt Wed Dec 16 22:59:55 2015
@@ -0,0 +1,24 @@
+add_definitions(-DHAVE_STRERROR -DHAS_MKDIR -DHAS_RMDIR -DI_TIME)
+
+macro(test_input run_type basename)
+  llvm_test_run(RUN_TYPE ${run_type}
+    ${basename}.pl
+    < ${BENCHMARK_DIR}/data/${run_type}/input/${basename}.in
+    > ${CMAKE_CURRENT_BINARY_DIR}/${basename}.out
+    WORKDIR ${BENCHMARK_DIR}/data/${run_type}/input
+  )
+  llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
+    ${BENCHMARK_DIR}/data/${run_type}/output/${basename}.out
+    ${CMAKE_CURRENT_BINARY_DIR}/${basename}.out
+  )
+endmacro()
+
+test_input(test jumble)
+test_input(test primes)
+test_input(train jumble)
+test_input(train primes)
+test_input(train scrabbl)
+test_input(ref primes)
+test_input(ref scrabbl)
+
+llvm_multisource()

Added: test-suite/trunk/External/SPEC/CINT95/147.vortex/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT95/147.vortex/CMakeLists.txt?rev=255878&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT95/147.vortex/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT95/147.vortex/CMakeLists.txt Wed Dec 16 22:59:55 2015
@@ -0,0 +1,32 @@
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+  add_definitions(-D__RISC_64__)
+endif()
+include(TestBigEndian)
+if (IS_BIGENDIAN)
+  set(INPUTNAME "vortex.in.big")
+else()
+  set(INPUTNAME "vortex.in.little")
+endif()
+
+macro(test_input run_type)
+  llvm_test_run(RUN_TYPE ${run_type}
+    ${INPUTNAME}
+    WORKDIR ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input
+  )
+  llvm_test_verify(RUN_TYPE ${run_type} ${FPCMP}
+    ${BENCHMARK_DIR}/data/${run_type}/output/vortex.out
+    ${CMAKE_CURRENT_BINARY_DIR}/data/${run_type}/input/vortex.out
+  )
+endmacro()
+
+test_input(test)
+test_input(train)
+test_input(ref)
+
+llvm_multisource()
+target_link_libraries(147.vortex m)
+
+# The benchmark writes the output where the input files are, so we have to
+# copy the data over.
+include(CopyDir)
+llvm_copy_dir(147.vortex ${CMAKE_CURRENT_BINARY_DIR}/data ${BENCHMARK_DIR}/data)

Added: test-suite/trunk/External/SPEC/CINT95/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT95/CMakeLists.txt?rev=255878&view=auto
==============================================================================
--- test-suite/trunk/External/SPEC/CINT95/CMakeLists.txt (added)
+++ test-suite/trunk/External/SPEC/CINT95/CMakeLists.txt Wed Dec 16 22:59:55 2015
@@ -0,0 +1,24 @@
+list(APPEND CPPFLAGS -DSPEC_CPU95)
+
+macro(cint95_subdir)
+  foreach(BENCHMARK ${ARGN})
+    set(BENCHMARK_DIR ${TEST_SUITE_SPEC95_ROOT}/benchspec/CINT95/${BENCHMARK})
+    set(PROG ${BENCHMARK})
+    file(GLOB Source ${BENCHMARK_DIR}/src/*.c ${BENCHMARK_DIR}/src/*.cpp)
+    if(NOT DEFINED TEST_SUITE_RUN_TYPE)
+      set(TEST_SUITE_RUN_TYPE "train")
+    endif()
+    llvm_add_subdirectories(${BENCHMARK})
+  endforeach()
+endmacro()
+
+cint95_subdir(
+  099.go
+  124.m88ksim
+  #  126.gcc # uses nonstandard lvalue casts which clang doesn't support
+  129.compress
+  130.li
+  132.ijpeg
+  134.perl
+  147.vortex
+)

Modified: test-suite/trunk/External/SPEC/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CMakeLists.txt?rev=255878&r1=255877&r2=255878&view=diff
==============================================================================
--- test-suite/trunk/External/SPEC/CMakeLists.txt (original)
+++ test-suite/trunk/External/SPEC/CMakeLists.txt Wed Dec 16 22:59:55 2015
@@ -3,8 +3,13 @@ if(TARGET_OS STREQUAL "Darwin")
   list(APPEND CPPFLAGS -Wno-implicit-function-declaration)
 endif()
 
-llvm_externals_find(TEST_SUITE_SPEC2000_ROOT "speccpu2000" "SPEC CPU2000")
+llvm_externals_find(TEST_SUITE_SPEC95_ROOT "spec95" "SPEC CPU95")
+if(TEST_SUITE_SPEC95_ROOT)
+  llvm_add_subdirectories(CINT95)
+  # Note that CFP95 tests are all fortran so not supported by cmake/lit yet
+endif()
 
+llvm_externals_find(TEST_SUITE_SPEC2000_ROOT "speccpu2000" "SPEC CPU2000")
 if(TEST_SUITE_SPEC2000_ROOT)
   llvm_add_subdirectories(CFP2000 CINT2000)
 endif()




More information about the llvm-commits mailing list