summaryrefslogtreecommitdiff
path: root/0026-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch
diff options
context:
space:
mode:
Diffstat (limited to '0026-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch')
-rw-r--r--0026-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/0026-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch b/0026-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch
new file mode 100644
index 0000000..b57a5a6
--- /dev/null
+++ b/0026-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch
@@ -0,0 +1,37 @@
+From 7efae59159577657f22511aa3b2cebe85ca60d9d Mon Sep 17 00:00:00 2001
+From: dingguangya <dingguangya1@huawei.com>
+Date: Mon, 4 Sep 2023 16:30:58 +0800
+Subject: [PATCH 2/2] [GOMP] Enabling moutline-atomics improves libgomp
+ performance in multi-thread scenarios
+
+Libgomp is used in multi-thread scenarios,
+Enabling moutline-atomics improves performance.
+---
+ libgomp/configure.tgt | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt
+index 2cd7272fc..f924e9f98 100644
+--- a/libgomp/configure.tgt
++++ b/libgomp/configure.tgt
+@@ -32,6 +32,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
++
+ tmake_file=
+ # Since we require POSIX threads, assume a POSIX system by default.
+ config_path="posix"
+--
+2.33.0
+