This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.2 by this push:
new eeb911077dc branch-4.2: [Enhance](thirdparty) Enable phmap intrinsic
int128 support on Clang AArch64 (#69402)
eeb911077dc is described below
commit eeb911077dcd700ce513e5e1e0b96117413da05e
Author: linrrarity <[email protected]>
AuthorDate: Thu Oct 22 11:39:21 2026 +0800
branch-4.2: [Enhance](thirdparty) Enable phmap intrinsic int128 support on
Clang AArch64 (#69402)
pick: https://github.com/apache/doris/pull/69144
---
thirdparty/download-thirdparty.sh | 12 +++++++++++
.../parallel-hashmap-1.3.8-aarch64-int128.patch | 23 ++++++++++++++++++++++
2 files changed, 35 insertions(+)
diff --git a/thirdparty/download-thirdparty.sh
b/thirdparty/download-thirdparty.sh
index 431d5a5d013..198e328c79c 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -753,4 +753,16 @@ if [[ " ${TP_ARCHIVES[*]} " =~ " CCTZ " ]] ; then
echo "Finished patching ${CCTZ_SOURCE}"
fi
+# Clang on AArch64 supports __int128. Enable phmap's multiply-based hash mixer
+# instead of falling back to the longer shift/xor implementation.
+if [[ " ${TP_ARCHIVES[*]} " =~ " PARALLEL_HASHMAP " ]]; then
+ cd "${TP_SOURCE_DIR}/${PARALLEL_HASHMAP_SOURCE}"
+ if [[ ! -f "${PATCHED_MARK}_aarch64_int128" ]]; then
+ patch -p1
<"${TP_PATCH_DIR}/parallel-hashmap-1.3.8-aarch64-int128.patch"
+ touch "${PATCHED_MARK}_aarch64_int128"
+ fi
+ cd -
+ echo "Finished patching ${PARALLEL_HASHMAP_SOURCE} for AArch64 int128"
+fi
+
# vim: ts=4 sw=4 ts=4 tw=100:
diff --git a/thirdparty/patches/parallel-hashmap-1.3.8-aarch64-int128.patch
b/thirdparty/patches/parallel-hashmap-1.3.8-aarch64-int128.patch
new file mode 100644
index 00000000000..47c171e54dd
--- /dev/null
+++ b/thirdparty/patches/parallel-hashmap-1.3.8-aarch64-int128.patch
@@ -0,0 +1,23 @@
+Backport upstream 4e410c7af3f93c4928c1fc84413720a2935ecd4a (PR #290).
+Keep the ARM32 exclusion while enabling intrinsic multiplication on ARM64.
+https://github.com/greg7mdp/parallel-hashmap/pull/290
+
+diff --git a/parallel_hashmap/phmap_config.h b/parallel_hashmap/phmap_config.h
+--- a/parallel_hashmap/phmap_config.h
++++ b/parallel_hashmap/phmap_config.h
+@@ -208,10 +208,14 @@
+ // Checks whether the __int128 compiler extension for a 128-bit
+ // integral type is supported.
+ // ------------------------------------------------------------
++#if defined(__arm__) && !defined(__aarch64__)
++ #define PHMAP_ARM_32
++#endif
++
+ #ifdef PHMAP_HAVE_INTRINSIC_INT128
+ #error PHMAP_HAVE_INTRINSIC_INT128 cannot be directly set
+ #elif defined(__SIZEOF_INT128__)
+- #if (defined(__clang__) && !defined(_WIN32) && !defined(__aarch64__)) || \
++ #if (defined(__clang__) && !defined(_WIN32) && !defined(PHMAP_ARM_32)) ||
\
+ (defined(__CUDACC__) && __CUDACC_VER_MAJOR__ >= 9) || \
+ (defined(__GNUC__) && !defined(__clang__) && !defined(__CUDACC__))
+ #define PHMAP_HAVE_INTRINSIC_INT128 1
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]