hyperscan: support aarch64 platform #212
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.