summaryrefslogtreecommitdiff
path: root/0102-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch
diff options
context:
space:
mode:
Diffstat (limited to '0102-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch')
-rw-r--r--0102-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/0102-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch b/0102-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch
new file mode 100644
index 0000000..019af78
--- /dev/null
+++ b/0102-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch
@@ -0,0 +1,34 @@
+From 8aeb2d4d05f6c0ba949fa3fa85ea5ac75a7255c9 Mon Sep 17 00:00:00 2001
+From: d00573793 <dingguangya1@huawei.com>
+Date: Mon, 19 Jun 2023 23:56:49 +0800
+Subject: [PATCH] [GOMP] Enabling moutline-atomics improves libgomp performance
+ in multi-thread scenarios
+
+Libgomp is used in multi-thread scenarios,
+Enabling moutline-atomics improves performance.
+
+diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt
+index 4790a31e3..e5b558be0 100644
+--- a/libgomp/configure.tgt
++++ b/libgomp/configure.tgt
+@@ -30,6 +30,17 @@ if test $gcc_cv_have_tls = yes ; then
+ esac
+ fi
+
++# Enabling moutline-atomics improves libgomp performance in multi-thread scenarios.
++case "${target_cpu}" in
++ aarch64*)
++ case "${target}" in
++ aarch64*-*-linux*)
++ XCFLAGS="${XCFLAGS} -moutline-atomics"
++ ;;
++ esac
++ ;;
++esac
++
+ # Since we require POSIX threads, assume a POSIX system by default.
+ config_path="posix"
+
+--
+2.27.0.windows.1
+