已开启
hygon/nt-store #749
hygon/nt-store #749
已开启
optivex创建于 13 天前
optivex
13 天前

当前PR是否有AI参与:

[x] 否

[ ] Yes
__1. AI Agent 平台:
__2. AI 模型 :
__3. Prompt 上下文 :

参考:openEuler社区《生成式AI工具使用与开源贡献政策》

PR功能描述 / 为什么需要这个合入**:

本补丁扩展非临时存储(Non-temporal Store,NT Store)优化,针对满足条件的大规模写入后不再复用时使用非临时存储指令,减少写分配引入的额外缓存行读取,提高流式写入效率及有效内存带宽。STREAM 测试结果表明,启用该优化后,相关测试项的实测带宽有所提升。原有优化仅在向量化后标记 NT Store,向量器无法提前考虑其对齐要求,可能生成对齐保证不足的向量存储。在 RTL 展开阶段,如果编译器已知的对齐不足以满足向量模式要求,expand_assignment 可能进入未对齐存储 处理路径,生成普通存储并提前返回,导致 NT Store 标记未能转化为实际的非临时存储指令。
为此,本补丁采用向量化前、后两阶段分析:向量化前标记候选存储,引导向量器处理对齐要求;向量化后清除初步标记并重新分析,确定最终采用 NT Store 的存储,并在需要时插入内存屏障。

主要修改如下:

  1. 扩展 x86 MOVNTDQ 及 storent 模式,覆盖 QI、HI、SI、DI 整数元素类型的 128/256/512 位向量存储,为中端优化提供后端支持。
  2. 增加向量化前后的非临时存储分析与转换,处理访问对齐、候选存储重新判定和内存屏障插入。
  3. 对无显式 chunk 的 OpenMP static 循环,尝试恢复原始常量迭代次数,改善复用距离估计。
  4. 新增 6 个测试用例(GCC 2 个、libgomp 4 个),覆盖串行及 OpenMP 场景、标量和向量存储、阈值边界,并适配已有 prefetch 测试的 dump 名称。

该PR关联的issue

(格式为fixes #<issue号>, 或者resolves #<issue号>): fixes #

希望检视人员了解:

  • 两个提交存在依赖关系:先扩展 x86 MOVNTDQ 支持,再引入中端非临时存储优化。
  • 新选项默认关闭,使用 -O3 -fnon-temporal-store 显式启用;是否生成 NT store 仍取决于目标指令集、访问对齐和分析条件。
likedislike
合并受阻
Ooptivex
13 天前 创建了 pull request,commit 9a5c0812
openeuler-ci-botopeneuler-ci-bot成员
13 天前 将alexanderbill,neu-mobi,li-yancheng,xiezhaokun,cf-zhao,eastb233,wangqiang95,kuenking111_admin,wd-gitcode,chenzheng1030设为审查人
openeuler-ci-botopeneuler-ci-bot成员
13 天前 添加了label:sig/Compiler
openeuler-ci-bot
openeuler-ci-bot成员
13 天前 评论:

Welcome To openEuler Community

Hey @optivex , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands. You can self-configure the PR merge rules for this repository. For more details, please refer to Here.

Contact Guide

If you have any questions, please contact the SIG: Compiler ,
and any of the maintainers: @alexanderbill, @cf-zhao, @chenzheng1030, @eastb233, @kuenking111_admin, @li-yancheng, @neu-mobi, @wangqiang95, @wd-gitcode, @xiezhaokun ,
and any of the committers: @huang-xiaoquan, @huzife, @lin-4682 .

likedislike
openeuler-ci-botopeneuler-ci-bot成员
13 天前 添加了label:stat/needs-squash
openeuler-ci-botopeneuler-ci-bot成员
13 天前 添加了label:openeuler-cla/no
openeuler-bot
openeuler-bot成员
13 天前 评论:

门禁正在运行, 您可以通过以下链接查看实时门禁检查结果.
若您对门禁结果含义不清晰或者遇到问题不知如何解决,可参考门禁指导手册
门禁入口及编码规范检查: multiarch/src-openeuler/trigger/gcc/108

likedislike
openeuler-botopeneuler-bot成员
13 天前 添加了label:ci_processing
openeuler-ci-bot
openeuler-ci-bot成员
13 天前 评论:

当前仓库存在以下 保护分支 :

Protected Branch Version Release
master 12.3.1 114
openEuler-26.09 12.3.1 114
openEuler-24.03-LTS-Next 12.3.1 115
openEuler-24.03-LTS-SP4 12.3.1 112
openEuler-26.09-DevStation 12.3.1 114
openEuler-24.03-LTS-SP3 12.3.1 111
openEuler-24.03-LTS-SP1 12.3.1 67
openEuler-22.03-LTS-SP4 10.3.1 72
openEuler-20.03-LTS-SP4 7.3.0 2020033101.59
upgrade-gcc-12 12.3.0 2
openEuler1.0-base 7.3.0 20190804.h30
openEuler1.0 7.3.0 20190804.h30
openEuler-22.03-LTS-performance 10.3.1 15
openEuler-22.03-LTS-LoongArch 10.3.1 23
openEuler-21.03-performance 9.3.1 20211230.20
openEuler-20.03-LTS-performance 7.3.0 20190804.h32

评论 /sync <branch1> <branch2> ... 可将当前 PR 修改同步到其它分支(创建同步 PR):
a) 如果当前 PR 是 Open 状态,同步操作将延迟到 PR 被合并时执行
b) 如果当前 PR 已经 Merged,将立即执行同步操作

注意:

  1. /sync 命令可以指定同步到多个分支,仅最后一个 /sync 命令生效
  2. 如果创建的同步 PR 不正确,可通过向同步 PR 的源分支提交轻量级 PR 完善,或使用 /close 命令关闭
likedislike
openeuler-bot
openeuler-bot成员
13 天前 评论:

x86_64架构构建及构建后检查:multiarch/src-openeuler/x86-64/gcc/108

likedislike
openeuler-bot
openeuler-bot成员
13 天前 评论:

aarch64架构构建及构建后检查:multiarch/src-openeuler/aarch64/gcc/108

likedislike
openeuler-botopeneuler-bot成员
13 天前 删除了label:ci_processing
openeuler-bot
openeuler-bot成员
13 天前 评论:
Check Name Build Result 详情 Build Details
check_binary_file ✅SUCCESS #108
check_lfsconfig ☑EXCLUDE
check_package_yaml_file ✅SUCCESS
check_repo_in_maintain ✅SUCCESS
check_consistency ✅SUCCESS
check_spec_file ✅SUCCESS
x86_64 check_build ✅SUCCESS #108
check_install ✅SUCCESS
check_license ✅SUCCESS
aarch64 check_build ✅SUCCESS #108
check_install ✅SUCCESS
check_license ✅SUCCESS
likedislike
openeuler-botopeneuler-bot成员
13 天前 添加了label:ci_successful
openeuler-bot
openeuler-bot成员
13 天前 评论:

如下为接口变更检查结果,目标分支为openEuler-24.03-LTS-Next,请PR提交者check差异信息

Arch Name Check Items Rpm Name Check Result Build Details
compare_package(x86_64) add_rpms ✅SUCCESS #108
delete_rpms ✅SUCCESS
rpm_abi ✅SUCCESS
rpm_cmd ✅SUCCESS
rpm_files ✅SUCCESS
rpm_header gcc-plugin-devel ❌FAILED
rpm_lib ✅SUCCESS
rpm_provides ✅SUCCESS
rpm_requires ✅SUCCESS
rpm_symbol ✅SUCCESS
compare_package(aarch64) add_rpms ✅SUCCESS #108
delete_rpms ✅SUCCESS
rpm_abi ✅SUCCESS
rpm_cmd ✅SUCCESS
rpm_files ✅SUCCESS
rpm_header gcc-plugin-devel ❌FAILED
rpm_lib ✅SUCCESS
rpm_provides ✅SUCCESS
rpm_requires ✅SUCCESS
rpm_symbol ✅SUCCESS
likedislike
openeuler-bot
openeuler-bot成员
13 天前 评论:
likedislike
optivex
9 天前 评论:

/check-cla

likedislike
openeuler-ci-botopeneuler-ci-bot成员
9 天前 删除了label:openeuler-cla/no
openeuler-ci-botopeneuler-ci-bot成员
9 天前 添加了label:openeuler-cla/yes
openeuler-ci-bot
openeuler-ci-bot成员
9 天前 评论:

CLA Signature Pass

optivex, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike