Exploring the Space of Optimization Sequences for Code-Size Reduction: Insights and Tools
The optimization space of a compiler is the set of every possible sequence of optimizations that said compiler can use. The exploration of the optimization space of any mainstream compiler has been, for decades, hampered by the lack of benchmarks. However, recent efforts from different research groups have made available a large quantity of compilable code that can be, today, used to overcome this problem. In this paper, we use 15,000 programs from a public collection to explore the optimization space of LLVM, focusing on code-size reduction. This exploration reveals that the probability of beating the default optimization levels of LLVM with random sequences ranges from 10% (considering opt -Oz
) to 19% (considering clang -Os
). Yet, the distribution of probabilities is uneven across programs: the default levels work well for most programs, and poorly for a few. Based on these observations, we introduce the notion of an Optimization Cache, a table of programs to optimization sequences that can be used to support predictive compilation. We then use an optimization cache to build what we call a Default Covering Set: a small ensemble of optimization sequences that, once combined, tend to be good for any program. Optimization caches and default covering sets are used independently. The former, when applied onto MiBench, yield programs that are 11.9% smaller than programs produced by opt -Os
, on average. The latter produce programs 12.5% smaller.
Tue 2 MarDisplayed time zone: Eastern Time (US & Canada) change
13:30 - 14:15 | |||
13:30 15mTalk | PGZ: Automatic Zero-Value Code Specialization CC Research Papers | ||
13:45 15mTalk | Exploring the Space of Optimization Sequences for Code-Size Reduction: Insights and Tools CC Research Papers Anderson Faustino da Silva State University of Maringá, Bernardo N. B. de Lima Federal University of Minas Gerais, Fernando Magno Quintão Pereira Federal University of Minas Gerais | ||
14:00 15mTalk | PolyBench/Python: Benchmarking Python Environments with Polyhedral Optimizations CC Research Papers Miguel Á. Abella-González Universidade da Coruña, Pedro Carollo-Fernández Universidade da Coruña, Louis-Noël Pouchet Colorado State University, Fabrice Rastello Inria, Gabriel Rodríguez Universidade da Coruña |