-
Notifications
You must be signed in to change notification settings - Fork 79
Add FEATURE_JIT_SIMD option #966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: pharo-12
Are you sure you want to change the base?
Conversation
guillep
commented
Apr 30, 2025
- Make JIT SIMD optional with <option: #FEATURE_JIT_SIMD>
- Add option FEATURE_JIT_SIMD to CMakeLists.txt
- Add FEATURE_JIT_SIMD as a compile time option
- Make JIT SIMD optional with <option: #FEATURE_JIT_SIMD> - Add option FEATURE_JIT_SIMD to CMakeLists.txt - Add FEATURE_JIT_SIMD as a compile time option
option(VERBOSE_BUILD "Verbose Build" OFF) | ||
option(FEATURE_FFI "Enable FFI" ON) | ||
option(FEATURE_THREADED_FFI "Enable Threaded (running in another thread) FFI" ON) | ||
option(FEATURE_MESSAGE_COUNT "Enable the option to count messages, only valid for StackVM" OFF) | ||
option(FEATURE_NETWORK "Enable network and sockets" ON) | ||
option(FEATURE_JIT_SIMD "Use SIMD support in JIT compilation when available" ON) | ||
option(FEATURE_LIB_SDL2 "Build SDL2 support" ON) | ||
option(FEATURE_LIB_CAIRO "Build Cairo support" ON) | ||
option(FEATURE_LIB_FREETYPE2 "Build freetype2 support" ON) | ||
option(FEATURE_LIB_GIT2 "Build LibGit2 support" ON) | ||
option(FEATURE_LIB_PTHREADW32 "Windows only, link to win32 version of pthread" OFF) | ||
option(GENERATE_VMMAKER "If it generates the VMMaker image" ON) | ||
option(GENERATE_SOURCES "If it generates the C sources" ON) | ||
option(ALWAYS_INTERACTIVE "Be interactive by default" OFF) | ||
option(BUILD_BUNDLE "Builds a bundle with all dependencies" ON) | ||
option(FEATURE_COMPILE_GNUISATION | ||
"Use gcc gnu extensions to compile the VM" ON) | ||
option(FEATURE_COMPILE_INLINE_MEMORY_ACCESSORS | ||
"Use inline memory accessors instead of macros" ON) | ||
option(PHARO_DEPENDENCIES_PREFER_DOWNLOAD_BINARIES | ||
"Prefer downloading dependencies" OFF) | ||
option(PHARO_VM_IN_WORKER_THREAD | ||
"Run the VM in a thread different that the main" ON) | ||
option(DEPENDENCIES_FORCE_BUILD | ||
"Force build libraries" OFF) | ||
option(BUILD_WITH_GRAPHVIZ | ||
"Generate dependency graphs" ON) | ||
option(VERSION_UPDATE_FROM_GIT | ||
"Extract version information from git tags. Default to true. Follow vX.Y.Z-suffix" ON) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I formatted a bit this code, the actually important line is line 25 adding
FEATURE_JIT_SIMD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you formatted or unformatted the code 😆
if (${FEATURE_COMPILE_INLINE_MEMORY_ACCESSORS}) | ||
add_compile_definitions(USE_INLINE_MEMORY_ACCESSORS=1) | ||
endif() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cleaned a bit these compile time definitions to make them local to the VM library compilation and not global options to the entire project.
@@ -99,6 +99,7 @@ VMBasicConstants class >> namesDefinedAtCompileTime [ | |||
will be emitted within #if defined(ANameDefinedAtCompileTime)...#endif." | |||
^#( VMBIGENDIAN | |||
IMMUTABILITY | |||
FEATURE_JIT_SIMD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to move this VMBasicConstants class >> namesDefinedAtCompileTime
somewhere else, it looks like a strange dependency.
{ #category : 'testing' } | ||
CogX64Compiler >> checkIs32bit: offset [ | ||
|
||
(offset between: -2147483648 and: 2147483647) ifFalse: [ | ||
self error: 'Cannot jump to distances larger than 32 bits' ] | ||
] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method has just been reordered by tonel...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Niceeee 🪂 🧨
option(VERBOSE_BUILD "Verbose Build" OFF) | ||
option(FEATURE_FFI "Enable FFI" ON) | ||
option(FEATURE_THREADED_FFI "Enable Threaded (running in another thread) FFI" ON) | ||
option(FEATURE_MESSAGE_COUNT "Enable the option to count messages, only valid for StackVM" OFF) | ||
option(FEATURE_NETWORK "Enable network and sockets" ON) | ||
option(FEATURE_JIT_SIMD "Use SIMD support in JIT compilation when available" ON) | ||
option(FEATURE_LIB_SDL2 "Build SDL2 support" ON) | ||
option(FEATURE_LIB_CAIRO "Build Cairo support" ON) | ||
option(FEATURE_LIB_FREETYPE2 "Build freetype2 support" ON) | ||
option(FEATURE_LIB_GIT2 "Build LibGit2 support" ON) | ||
option(FEATURE_LIB_PTHREADW32 "Windows only, link to win32 version of pthread" OFF) | ||
option(GENERATE_VMMAKER "If it generates the VMMaker image" ON) | ||
option(GENERATE_SOURCES "If it generates the C sources" ON) | ||
option(ALWAYS_INTERACTIVE "Be interactive by default" OFF) | ||
option(BUILD_BUNDLE "Builds a bundle with all dependencies" ON) | ||
option(FEATURE_COMPILE_GNUISATION | ||
"Use gcc gnu extensions to compile the VM" ON) | ||
option(FEATURE_COMPILE_INLINE_MEMORY_ACCESSORS | ||
"Use inline memory accessors instead of macros" ON) | ||
option(PHARO_DEPENDENCIES_PREFER_DOWNLOAD_BINARIES | ||
"Prefer downloading dependencies" OFF) | ||
option(PHARO_VM_IN_WORKER_THREAD | ||
"Run the VM in a thread different that the main" ON) | ||
option(DEPENDENCIES_FORCE_BUILD | ||
"Force build libraries" OFF) | ||
option(BUILD_WITH_GRAPHVIZ | ||
"Generate dependency graphs" ON) | ||
option(VERSION_UPDATE_FROM_GIT | ||
"Extract version information from git tags. Default to true. Follow vX.Y.Z-suffix" ON) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you formatted or unformatted the code 😆
There are related failing tests:
|