Phitchaya Phothilimthana and Aditya Thakur and Rastislav Bodik and Dinakar Dhurjati

EECS Department, University of California, Berkeley

Technical Report No. UCB/EECS-2016-8

February 10, 2016

http://www2.eecs.berkeley.edu/Pubs/TechRpts/2016/EECS-2016-8.pdf

Developing an optimizing compiler backend remains a laborious process, especially for nontraditional ISAs that have been appearing recently. Superoptimization sidesteps the need for many code transformations by searching for the most optimal instruction sequence semantically equivalent to the original code fragment. Even though superoptimization discovers the best machine-specific code optimizations, it has yet to become widely-used. We propose GreenThumb, an extensible framework that reduces the cost of constructing superoptimizers and provides a fast search algorithm that can be reused for any ISA, exploiting the unique strengths of enumerative, stochastic, and symbolic (SAT-solver-based) search algorithms. To extend GreenThumb to a new ISA, it is only necessary to implement an emulator for the ISA and provide some ISA-specific search utility functions. This paper demonstrates retargetability of GreenThumb by showing how to construct a superoptimizer for a small subset of LLVM IR.


BibTeX citation:

@techreport{Phothilimthana:EECS-2016-8,
    Author= {Phothilimthana, Phitchaya and Thakur, Aditya and Bodik, Rastislav and Dhurjati, Dinakar},
    Title= {GreenThumb: Superoptimizer Construction Framework},
    Year= {2016},
    Month= {Feb},
    Url= {http://www2.eecs.berkeley.edu/Pubs/TechRpts/2016/EECS-2016-8.html},
    Number= {UCB/EECS-2016-8},
    Abstract= {Developing an optimizing compiler backend remains a laborious process, especially for nontraditional ISAs that have been appearing recently. Superoptimization sidesteps the need for many code transformations by searching for the most optimal instruction sequence semantically equivalent to the original code fragment. Even though superoptimization discovers the best machine-specific code optimizations, it has yet to become widely-used.  We propose GreenThumb, an extensible framework that reduces the cost of constructing superoptimizers and provides a fast search algorithm that can be reused for any ISA, exploiting the unique strengths of enumerative, stochastic, and symbolic (SAT-solver-based) search algorithms. To extend GreenThumb to a new ISA, it is only necessary to implement an emulator for the ISA and provide some ISA-specific search utility functions. 
This paper demonstrates retargetability of GreenThumb by showing how to construct a superoptimizer for a small subset of LLVM IR.},
}

EndNote citation:

%0 Report
%A Phothilimthana, Phitchaya 
%A Thakur, Aditya 
%A Bodik, Rastislav 
%A Dhurjati, Dinakar 
%T GreenThumb: Superoptimizer Construction Framework
%I EECS Department, University of California, Berkeley
%D 2016
%8 February 10
%@ UCB/EECS-2016-8
%U http://www2.eecs.berkeley.edu/Pubs/TechRpts/2016/EECS-2016-8.html
%F Phothilimthana:EECS-2016-8