A graph-based iterative compiler pass selection and phase ordering approach

Author:

Nobre Ricardo1,Martins Luiz G. A.2,Cardoso João M. P.1

Affiliation:

1. University of Porto, Portugal / INESC TEC, Portugal

2. Federal University of Uberlândia, Brazil

Abstract

Nowadays compilers include tens or hundreds of optimization passes, which makes it difficult to find sequences of optimizations that achieve compiled code more optimized than the one obtained using typical compiler options such as -O2 and -O3. The problem involves both the selection of the compiler passes to use and their ordering in the compilation pipeline. The improvement achieved by the use of custom phase orders for each function can be significant, and thus important to satisfy strict requirements such as the ones present in high-performance embedded computing systems. In this paper we present a new and fast iterative approach to the phase selection and ordering challenges resulting in compiled code with higher performance than the one achieved with the standard optimization levels of the LLVM compiler. The obtained performance improvements are comparable with the ones achieved by other iterative approaches while requiring considerably less time and resources. Our approach is based on sampling over a graph representing transitions between compiler passes. We performed a number of experiments targeting the LEON3 microarchitecture using the Clang/LLVM 3.7 compiler, considering 140 LLVM passes and a set of 42 representative signal and image processing C functions. An exhaustive cross-validation shows our new exploration method is able to achieve a geometric mean performance speedup of 1.28x over the best individually selected -OX flag when considering 100,000 iterations; versus geometric mean speedups from 1.16x to 1.25x obtained with state-of-the-art iterative methods not using the graph. From the set of exploration methods tested, our new method is the only one consistently finding compiler sequences that result in performance improvements when considering 100 or less exploration iterations. Specifically, it achieved geometric mean speedups of 1.08x and 1.16x for 10 and 100 iterations, respectively.

Funder

Fundação para a Ciência e a Tecnologia

NORTE 2020

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Reference28 articles.

1. GCC the GNU Compiler Collection https://www.gnu.org/software/gcc/. GCC the GNU Compiler Collection https://www.gnu.org/software/gcc/.

2. Finding effective compilation sequences

3. Deconstructing iterative optimization

4. Identifying sequences of optimizations for HW/SW compilation

5. Exploration of compiler optimization sequences using clustering-based selection

Cited by 8 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. A Two-Stage LLVM Option Sequence Optimization Method to Minimize Energy Consumption;Swarm and Evolutionary Computation;2024-07

2. SEER: Super-Optimization Explorer for High-Level Synthesis using E-graph Rewriting;Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2;2024-04-27

3. Tsoa: a two-stage optimization approach for GCC compilation options to minimize execution time;Automated Software Engineering;2024-04-24

4. A Two-Stage Option Sequence Optimization Method for Energy Consumption Minimization;2023

5. WasmAndroid: A Cross-Platform Runtime for Native Programming Languages on Android;ACM Transactions on Embedded Computing Systems;2022-10-29

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3