Stochastic superoptimization
Authors:
Open Access
- 16 March 2013
- conference paper
- Published by Association for Computing Machinery (ACM)
- Vol. 41 (1) , 305-316
Abstract
We formulate the loop-free binary superoptimization task as a stochastic search problem. The competing constraints of transformation correctness and performance improvement are encoded as terms in a cost function, and a Markov Chain Monte Carlo sampler is used to rapidly explore the space of all possible programs to find one that is an optimization of a given target program. Although our method sacrifices completeness, the scope of programs we are able to consider, and the resulting quality of the programs that we produce, far exceed those of existing superoptimizers. Beginning from binaries compiled by llvm -O0 for 64-bit x86, our prototype implementation, STOKE, is able to produce programs which either match or outperform the code produced by gcc -O3, icc -O3, and in some cases, expert handwritten assembly.Keywords
All Related Versions
This publication has 15 references indexed in Scilit:
- The Markov chain Monte Carlo revolutionBulletin of the American Mathematical Society, 2008
- Combinatorial sketching for finite programs2006
- Automatic generation of peephole superoptimizers2006
- Pin2005
- An updated set of basic linear algebra subprograms (BLAS)ACM Transactions on Mathematical Software, 2002
- Denali2002
- Sampling plausible solutions to multi-body constraint problems2000
- Extracting protein alignment models from the sequence databaseNucleic Acids Research, 1997
- Metropolis light transport1997
- Monte Carlo sampling methods using Markov chains and their applicationsBiometrika, 1970