-
Notifications
You must be signed in to change notification settings - Fork 730
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
hyperscan: support aarch64 platform #212
base: develop
Are you sure you want to change the base?
Conversation
c039c90
to
dfd4b80
Compare
Arm has invested in adding aarch64 support with x86-specific code abstracted away and arch specific code put into separate headers in src/util/arch/. This way, maintaining arch-specific code of hyperscan and/or porting hyperscan to a new architecture (eg Power/RISC-V/etc) should now be much easier. We have all tests passing for both architectures, and with our next step being to add NEON SIMD optimizations for aarch64. We would appreciate your review/comments of our approach here: #286 |
aarch64 support exists here: https://github.com/VectorCamp/vectorscan |
SIMDe on Clang needs SIMDE_NO_CHECK_IMMEDIATE_CONSTANT defined and other SIMDe related fixes now that SIMDe is part of the CI pipeline. Some issue with SIMDe on x86 still remains because of an upstream bug: simd-everywhere/simde#1119 Similarly SIMDe native with clang on Arm also poses a non-high priority build failure: https://buildbot-ci.vectorcamp.gr/#/builders/129/builds/11 Possibly a SIMDe issue as well, need to investigate but will merge this PR as these are non-blockers.
Add aarch64 platform branch, which is fully compatible with armv8-a, and at the same time ensure that the use of x86 platform is not affected.
The modification can be divided into the following aspects :
(1) CMakeLists.txt: add branches to judge x86 and aaarch64 platforms.
(2) simd_arm.h: Use the neon instruction to implement 128 operation functions.
(3) simd_x86.h: Save the original simd_utils.h file contents.
(4) simd_utils.h: Select different header files (simd_x86.h or simd_arm.h) according to the platform judgment results.
(5) Intrinsic function: There are multiple calls to the intrinsic function in the code, and the intrinsic function is encapsulated in the modification.
(6) control_verbs.cpp / ExpressionParser.cpp / control_verbs.cpp / Parser.cpp: There are errors in generating these four files under the aarch64 platform. So the files are generated on the x86 platform and copied to the corresponding directory for use. Does not affect the functionality of the x86 platform.
On the basis of support the aarch64 platform, we also carried out a large performance optimization. The optimization effect also improved the performance of hyperscan on the x86 platform. The currently submitted PR is a successful migration version, and we expect to submit a performance version later.