Skip to main content
QUICK REVIEW

[论文解读] Automatically Tuning the GCC Compiler to Optimize the Performance of Applications Running on the ARM Cortex-M3.

Craig Blackmore, Oliver Ray|arXiv (Cornell University)|Feb 23, 2017
Parallel Computing and Optimization Techniques被引用 5
一句话总结

本文提出一种自动化方法,用于为ARM Cortex-M3处理器调优GCC编译器标志,通过识别一个优化后的配置(-Ocm3),该配置移除了26个标志并新增了3个,从而在BEEBS基准测试套件中显著减少执行时间,性能提升超越标准的-O3优化级别。

ABSTRACT

This paper introduces a novel method for automatically tuning the selection of compiler flags in order to optimize the performance of software that is intended to run on particular hardware platforms. Motivated by the rapid recent expansion of so-called Internet of Things (IoT) devices, we are particularly interested in improving the execution time of code running on embedded system architectures. We demonstrate the effectiveness of our approach on code compiled by the GNU C Compiler (GCC) for the ARM Cortex-M3 (CM3) processor; and we show how our method outperforms the current industry standard -O3 optimization level across a diverse embedded system benchmark suite called BEEBS. We begin by conducting an investigatory study to quantify the potential gains by using existing iterative compilation approaches that time-intensively search for optimal configurations for each given benchmark. Then we adapt iterative compilation to output a single configuration that optimizes performance across the entire benchmark suite as a whole. Although this is a time consuming process, our approach eventually constructs a simple variation of -O3, which we call -Ocm3, that realizes nearly two thirds of the known available gains on the CM3 architecture (beyond -O3) and significantly outperforms a far more complex state-of-the-art predictive method. Our approach suggests that 26 flags should be removed from -O3 while three other flags should be added. We analyze in detail two of the former and explain why turning them off improves performance on this processor.

研究动机与目标

  • 为解决在资源受限的物联网设备中手动选择最优编译器标志的挑战。
  • 探索迭代编译是否能够识别出一个统一的编译器配置,以在多样化基准测试套件中实现性能优化。
  • 在ARM Cortex-M3架构上,超越现有最先进的预测性调优方法,实现编译器调优的性能突破。
  • 识别并分析在CM3处理器上显著影响性能的特定编译器标志,包括其移除或添加的影响。

提出的方法

  • 本研究采用迭代编译方法,系统性地探索编译器标志配置,并测量其在BEEBS基准测试套件上的性能影响。
  • 通过耗时的搜索过程,将整个基准测试套件视为单一优化目标,识别出最优配置。
  • 基于性能提升结果,从-O3中移除26个标志并新增3个标志,生成派生的优化级别-Ocm3。
  • 该方法将最终的-Ocm3配置与-O3及一种复杂的预测性调优方法进行评估和比较。
  • 对两个被移除的标志进行详细分析,以解释其在CM3架构上产生负面性能影响的原因。
  • 在完整的BEEBS套件上对最终配置进行验证,以衡量整体性能提升。

实验结果

研究问题

  • RQ1迭代编译能否识别出一个单一的编译器配置,以在多样化嵌入式基准测试套件中实现性能优化?
  • RQ2在ARM Cortex-M3上,相较于标准的-O3优化级别,能够实现多大程度的性能提升?
  • RQ3在CM3架构上,哪些特定编译器标志的移除或添加能带来可测量的性能改进?
  • RQ4所提出的-Ocm3配置在性能和简洁性方面,与最先进的预测性调优方法相比如何?
  • RQ5为何某些编译器标志会在ARM Cortex-M3上对性能产生负面影响,其根本原因是什么?

主要发现

  • 所提出的-Ocm3配置在ARM Cortex-M3上实现了超越-O3的已知最大性能增益的近三分之二。
  • 尽管方法简单,其性能仍优于更复杂的最先进的预测性调优方法。
  • 从-O3中移除26个特定标志并新增3个标志,可带来可测量且显著的性能提升。
  • 分析发现,其中两个被移除的标志会因增加指令级并行性开销而在CM3的流水线中降低性能。
  • 最终配置在BEEBS基准测试套件中比-O3更有效地减少了执行时间,证明了端到端、全套件调优的价值。
  • 本研究证实,针对特定架构的调优即使在最高标准优化级别之后,仍能带来显著性能增益。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。