加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0026-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
dingguangya 提交于 2023-09-04 20:06 . [Sync] Sync patch from openeuler/gcc
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化