计算机科学 ›› 2014, Vol. 41 ›› Issue (Z11): 364-367.

• 软件工程与数据库技术 • 上一篇    下一篇

GCC编译器中编译指导的自动向量化实现

徐颖,李春江,董钰山,周思齐   

  1. 国防科学技术大学计算机学院计算机研究所 长沙410073;国防科学技术大学计算机学院计算机研究所 长沙410073;国防科学技术大学计算机学院计算机研究所 长沙410073;国防科学技术大学计算机学院计算机研究所 长沙410073
  • 出版日期:2018-11-14 发布日期:2018-11-14
  • 基金资助:
    本文受国家自然科学基金项目:多核多线程处理器SIMD扩展的编程模型及编译优化关键技术研究(61170046),863计划项目:面向国产飞腾处理器的并行程序综合优化系统(2012AA010903)资助

Implementation of Auto-vectorization Based on Directives in GCC

XU Ying,LI Chun-jiang,DONG Yu-shan and ZHOU Si-qi   

  • Online:2018-11-14 Published:2018-11-14

摘要: 基于编译指导的自动向量化已经成为编译器开发SIMD体系结构性能潜力的必然选择。OpenMP 4.0规范新增了SIMD编译指导语句,在开发中的GCC 4.9版本已经开始着手支持OpenMP4.0规范。详细分析了SIMD编译指导在GCC 4.9中的实现情况,重点分析了SIMD编译指导在编译器自动向量化阶段的影响,这为改进GCC的现有实现和提高向量化能力提供了有价值的参考。

关键词: GCC,SIMD,编译指导,自动向量化

Abstract: Auto-vectorization based on directives has become an inevitable choice for compilers to exploit performance on SIMD architecture.The latest OpenMP 4.0 specification has added some SIMD directives,and the GCC 4.9 in deve-lopment began supporting OpenMP 4.0.We analyzed the implementation of SIMD directives in GCC 4.9 in detail,and focused on how the SIMD directives affect loop vectorization.Our work provides valued references to improve the existing auto-vectorization.

Key words: GCC,SIMD,Directives,Auto-vectorization

[1] Khronos OpenCL Working Group.The OpenCL Speci?cation[R].[2009].http://www.khronos.org/registry/cl/
[2] 姚远,赵荣彩.基于编译指示的向量化方法[J].Computer Engineering,2012,38(12):272-275
[3] Tian X,Saito H,Preis S V.Compiling C/C++SIMD Exten-sions for Function and Loop Vectorization on Multicore-SIMD Processors[C]∥Multicore and GPU Programming Models,Languages and Compilers Workshop.2012:2349-2358
[4] Klemm M,et al.Extending OpenMP* with vector constructs for modern multicore SIMD architectures[C]∥OpenMP in a Heterogeneous World,2012:59-72
[5] 黄娟娟,李春江,徐颖.GCC中自动向量化代价模型剖析[C]∥第17届计算机工程与工艺年会暨第三届微处理器技术论坛论文集.长沙:国防科技大学出版社,2013:259-268
[6] OpenMP Architecture Review Board:OpenMP Application Program Interface[M].Version 4.0(July 2013)
[7] Free Software Foundation Inc.GCC 4.9 Release Series http://gcc.gnu.org/gcc-4.9/
[8] Novillo D.Design and Implementation of Tree SSA[C]∥Proceedings of the 2004 GCC Summit.Ottawa,Canada,2004
[9] 黄娟娟.多线程多SIMD自动向量化技术研究[D].长沙:国防科学技术大学,2013
[10] 辛乃军,陈旭灿,等.基于GCC的高性能DSP Matrix向量指令集扩展[J].计算机工程与科学,2012,34(1):58-63
[11] 徐颖.编译器自动向量化效能评估与分析[D].长沙:国防科学技术大学,2012
[12] 李春江,黄娟娟,徐颖.典型编译器自动向量化效果评估与分析[J].计算机科学,2013(4):41-46

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!