[PATCH] D99640: [test-suite] SPEC2017 CPU pop2 floating point test.
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 19 09:43:24 PDT 2021
Meinersbur added a comment.
I think I would still prefer a common list of compile definitions for specpp and `add_definitions`. I.e.
set(SPEC_COMMON_DEFS)
if (ENDIAN STREQUAL "little")
list(APPEND SPEC_COMMON_DEFS "-DSPEC_AUTO_BYTEORDER=0x12345678")
elseif (ENDIAN STREQUAL "big")
list(APPEND SPEC_COMMON_DEFS "-DSPEC_AUTO_BYTEORDER=0x87654321")
endif ()
[...]
add_definitions(${SPEC_COMMON_DEFS})
[...]
add_custom_command(
COMMAND "${_specpp_bin}" ${SPEC_COMMON_DEFS} ...
)
(be aware )
================
Comment at: External/SPEC/CFP2017speed/628.pop2_s/CMakeLists.txt:161
+elseif (SUPPORTS_CONVERT_BIG_ENDIAN) # Intel
+ target_compile_options(${PROG} PRIVATE $<$<COMPILE_LANGUAGE:Fortran>:"SHELL:-convert big_endian")
+endif ()
----------------
What does the `SHELL:` do?
================
Comment at: External/SPEC/SpecCPU2017.cmake:118-125
+ # SPEC_AUTO_BYTEORDER_value variable is used for Fortran tests that use specpp
if (ENDIAN STREQUAL "little")
add_definitions(-DSPEC_AUTO_BYTEORDER=0x12345678)
+ set(SPEC_AUTO_BYTEORDER_VALUE 0x12345678)
elseif (ENDIAN STREQUAL "big")
add_definitions(-DSPEC_AUTO_BYTEORDER=0x87654321)
+ set(SPEC_AUTO_BTYEORDER_VALUE 0x87654321)
----------------
================
Comment at: External/SPEC/SpecCPU2017.cmake:130-145
+ # SPEC_PTR_TYPE variable is used for Fortran tests that use specpp
if (CMAKE_SIZEOF_VOID_P EQUAL 4 AND SIZEOF_LONG_LONG EQUAL 8 AND SIZEOF_LONG EQUAL 4 AND SIZEOF_INT EQUAL 4)
add_definitions(-DSPEC_ILP32)
+ set(SPEC_PTR_TYPE ILP32)
elseif (CMAKE_SIZEOF_VOID_P EQUAL 8 AND SIZEOF_LONG_LONG EQUAL 8 AND SIZEOF_LONG EQUAL 4 AND SIZEOF_INT EQUAL 4)
add_definitions(-DSPEC_P64)
+ set(SPEC_PTR_TYPE P64)
----------------
================
Comment at: External/SPEC/SpecCPU2017.cmake:375
+ file(GLOB _specpp_sources ${SRC_DIR}/*.F90)
+ list(REMOVE_ITEM _specpp_sources ${SRC_DIR}/test.F90) # pop2 source file that doesn't get linked
+
----------------
[change request] This is specific to pop2, i.e. should belong into `628.pop2_s/CMakeLists.txt`
Suggestion: Pass a SOURCES option to `speccpu2017_run_specpp`, do the globbing in `628.pop2_s/CMakeLists.txt`
Repository:
rT test-suite
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99640/new/
https://reviews.llvm.org/D99640
More information about the llvm-commits
mailing list