Learning to Superoptimize Real-world Programs

09/28/2021
by   Alex Shypula, et al.
0

Program optimization is the process of modifying software to execute more efficiently. Because finding the optimal program is generally undecidable, modern compilers usually resort to expert-written heuristic optimizations. In contrast, superoptimizers attempt to find the optimal program by employing significantly more expensive search and constraint solving techniques. Generally, these methods do not scale well to programs in real development scenarios, and as a result superoptimization has largely been confined to small-scale, domain-specific, and/or synthetic program benchmarks. In this paper, we propose a framework to learn to superoptimize real-world programs by using neural sequence-to-sequence models. We introduce the Big Assembly benchmark, a dataset consisting of over 25K real-world functions mined from open-source projects in x86-64 assembly, which enables experimentation on large-scale optimization of real-world programs. We propose an approach, Self Imitation Learning for Optimization (SILO) that is easy to implement and outperforms a standard policy gradient learning approach on our Big Assembly benchmark. Our method, SILO, superoptimizes programs an expected 6.2 test set when compared with the gcc version 10.3 compiler's aggressive optimization level -O3. We also report that SILO's rate of superoptimization on our test set is over five times that of a standard policy gradient approach and a model pre-trained on compiler optimization demonstration.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/15/2023

SEER: Super-Optimization Explorer for HLS using E-graph Rewriting with MLIR

High-level synthesis (HLS) is a process that automatically translates a ...
research
01/09/2023

Learning to compile smartly for program size reduction

Compiler optimization passes are an important tool for improving program...
research
01/13/2021

MLGO: a Machine Learning Guided Compiler Optimizations Framework

Leveraging machine-learning (ML) techniques for compiler optimizations h...
research
08/05/2021

Accelerating XOR-based Erasure Coding using Program Optimization Techniques

Erasure coding (EC) affords data redundancy for large-scale systems. XOR...
research
11/18/2021

Constraint-based Diversification of JOP Gadgets

Modern software deployment process produces software that is uniform and...
research
12/15/2021

Planning with Biological Neurons and Synapses

We revisit the planning problem in the blocks world, and we implement a ...
research
10/27/2020

Verified Secure Compilation for Mixed-Sensitivity Concurrent Programs

Proving only over source code that programs do not leak sensitive data l...

Please sign up or login with your details

Forgot password? Click here to reset