Proceedings of ISP RAS


Optimizing programs for given hardware architectures with static compilation: methods and tools.

Dmitry Melnik, Shamil Kurmangaleev, Arutyun Avetisyan, Andrey Belevantsev, Dmitry Plotnikov, Mamikon Vardanyan.

Abstract

The paper describes the workflow for optimizing programs for performance targeting the fixed hardware architecture with static compilation using GCC and LLVM compilers as examples. The workflow has gradually grown within ISP RAS Compiler Technology Team when working on GCC and LLVM compiler optimization. We start with preparing a benchmark using the given application as a source, and then proceed in parallel with manual analysis of generated assembly code and automatic compiler tuning tool. In general, a compiler optimization improvement produced by the manual analysis gives 1-5% speedup, while the automatic tuning results may give up to 10-20% speedup. However, the manual analysis results are usually valid for the broad class of applications and are contributed to the open source compilers, while the automatic tuning results make sense only for the given application.

We present some of the optimizations performed, e.g. improved NEON and Thumb-2 support for GCC, vectorization improvements for LLVM, register allocation improvements for LLVM, and the corresponding evaluation results. We also describe TACT, a tool for automatic compiler tuning for the given application mentioned above, and its example use cases both for an application developer and a compiler engineer. We give the sample of TACT optimization results.

Keywords

Program optimization, GCC, LLVM, automatic compiler tuning.

Edition

Proceedings of the Institute for System Programming, vol. 26, issue 1, 2014, pp. 343-356.

ISSN 2220-6426 (Online), ISSN 2079-8156 (Print).

DOI: 10.15514/ISPRAS-2014-26(1)-13

Full text of the paper in pdf Back to the contents of the volume