Automatic Feature Generation for Setting Compilers Heuristics

Hugh Leather, Elad Yom-Tov, Mircea Namolaru, Ari Freund

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Heuristics in compilers are often designed by manually analyzing sample programs. Recent advances have successfully applied machine learning to automatically generate heuristics. The typical format of these approaches reduces the input loops, functions or programs to a finite vector of features. A machine learning algorithm then learns a mapping from these features to the desired heuristic parameters. Choosing the right features is important and requires expert knowledge since no machine learning tool will work well with poorly chosen features.

This paper introduces a novel mechanism to generate features. Grammars describing languages of features are defined and from these grammars sentences are randomly produced. The features are then evaluated over input data and computed values are given to machine learning tools.

We propose the construction of domain specific feature languages for different purposes in different parts of the compiler. Using these feature languages, complex, machine generated features are extracted from program code. Using our observation that some functions can benefit from setting different compiler options, while others cannot, we demonstrate the use of a decision tree classifier to automatically identify the former using the automatically generated features.

We show that our method outperform human generated features on problems of loop unrolling and phase ordering, achieving a statistically significant decrease in run-time compared to programs compiled using GCC’s heuristics.
Original languageEnglish
Title of host publication2nd Workshop on statistical and machine learning approaches to Architectures and compilation (SMART 2008)
Number of pages16
Publication statusPublished - 1 Jan 2008
Event2nd Workshop on Statistical and Machine Learning Approaches Applied to Architectures and Compilation (SMART’08 - , United Kingdom
Duration: 27 Jan 2008 → …

Workshop

Workshop2nd Workshop on Statistical and Machine Learning Approaches Applied to Architectures and Compilation (SMART’08
Country/TerritoryUnited Kingdom
Period27/01/08 → …

Fingerprint

Dive into the research topics of 'Automatic Feature Generation for Setting Compilers Heuristics'. Together they form a unique fingerprint.

Cite this