paper-with-me

Papers

Learning to Make Compiler Optimizations More Effective

2021-02-24 · Rahim Mammadli, Marija Selakovic, Felix Wolf, Michael Pradel

Because loops execute their body many times, compiler developers place much emphasis on their optimization. Nevertheless, in view of highly diverse source code and hardware, compilers still struggle to produce optimal target code. The sheer number of possible loop optimizations, including their combinations, exacerbates the problem further. Today's compilers use hard-coded heuristics to decide when, whether, and which of a limited set of optimizations to apply. Often, this leads to highly unstable behavior, making the success of compiler optimizations dependent on the precise way a loop has been written. This paper presents LoopLearner, which addresses the problem of compiler instability by predicting which way of writing a loop will lead to efficient compiled code. To this end, we train a neural network to find semantically invariant source-level transformations for loops that help the compiler generate more efficient code. Our model learns to extract useful features from the raw source code and predicts the speedup that a given transformation is likely to yield. We evaluate LoopLearner with 1,895 loops from various performance-relevant benchmarks. Applying the transformations that our model deems most favorable prior to compilation yields an average speedup of 1.14x. When trying the top-3 suggested transformations, the average speedup even increases to 1.29x. Comparing the approach with an exhaustive search through all available code transformations shows that LoopLearner helps to identify the most beneficial transformations in several orders of magnitude less time.

📄 PDF Abstract BibTeX arXiv:2102.13514

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

A Survey on Compiler Autotuning using Machine Learning

2018-01-13 · Amir H. Ashouri, William Killian, John Cavazos, Gianluca Palermo 외

Since the mid-1990s, researchers have been trying to use machine-learning based approaches to solve a number of different compiler optimization problems. These techniques primarily enhance the quality of the obtained res…

BIG-bench Machine LearningCompiler OptimizationSurvey

Finding Missed Code Size Optimizations in Compilers using LLMs

2024-12-31 · Davide Italiano, Chris Cummins

Compilers are complex, and significant effort has been expended on testing them. Techniques such as random program generation and differential testing have proved highly effective and have uncovered thousands of bugs in …

Learning Branch Probabilities in Compiler from Datacenter Workloads

2022-02-10 · Easwaran Raman, Xinliang David Li

Estimating the probability with which a conditional branch instruction is taken is an important analysis that enables many optimizations in modern compilers. When using Profile Guided Optimizations (PGO), compilers are a…

The Next 700 ML-Enabled Compiler Optimizations

2023-11-17 · S. VenkataKeerthy, Siddharth Jain, Umesh Kalvakuntla, Pranav Sai Gorantla 외

There is a growing interest in enhancing compiler optimizations with ML models, yet interactions between compilers and ML frameworks remain challenging. Some optimizations require tightly coupled models and compiler inte…

CompilerDream: Learning a Compiler World Model for General Code Optimization

2024-04-24 · Chaoyi Deng, Jialong Wu, Ningya Feng, Jianmin Wang 외

Effective code optimization in compilers is crucial for computer and software engineering. The success of these optimizations primarily depends on the selection and ordering of the optimization passes applied to the code…

DiversityModel-based Reinforcement Learningreinforcement-learningValue prediction+1