This is an archive of the discontinued LLVM Phabricator instance.

[SPECCPU2017] Add addition platform options and missing flags.
ClosedPublic

Authored by Meinersbur on Jun 21 2018, 9:46 AM.

Details

Summary

Add portability flags for 64-bit Windows and Linux on ARM.

Also add missing SPEC and SPEC_CPU flags without which the compilation could fail on these platforms.

Diff Detail

Repository
rL LLVM

Event Timeline

Meinersbur created this revision.Jun 21 2018, 9:46 AM
MatzeB accepted this revision.Jun 21 2018, 10:20 AM

I don't have a copy of Spec2017 yet so I cannot test any of it.

The changes look sensible though, with some suggestions below:

External/SPEC/SpecCPU2017.cmake
117–147 ↗(On Diff #152329)

This feels like some SPEC flags (SPEC_LP64/SPEC_ILP32,SPEC_AUTO_BYTEORDER) should only depend on CMAKE_SIZEOF_VOID_P (and not the TARGET_OS) or IS_BIGENDIAN rather than getting shoved into per OS/per architecture parts.

137 ↗(On Diff #152329)

comment typo?

This revision is now accepted and ready to land.Jun 21 2018, 10:20 AM
Meinersbur added inline comments.Jun 21 2018, 12:13 PM
External/SPEC/SpecCPU2017.cmake
117–147 ↗(On Diff #152329)

I didn't know about IS_BIGENDIAN. I will use that.

SPEC_LP64/SPEC_ILP32/SPEC_LLP64 is a but more complicated, it definitely does not only depend on the address width. 64 bit msvc uses LLP64, clang on Windows is LLP64 (WindowsX86_64TargetInfo), mingw on Windows is LP64. I could use cmake's CheckTypeSize to check the exact type model.

Unfortunately there are flags such as SPEC_LINUX_X64, so we don't get around checks for specific platforms.

137 ↗(On Diff #152329)

Yes, indeed.

  • Derive platform flags by introspection as much as possible

My LGTM still stands (in case you are waiting for another approval).

This revision was automatically updated to reflect the committed changes.

My LGTM still stands (in case you are waiting for another approval).

Thanks for the remainder. There were larger changes since the approval, so I wasn't sure.