CAnDL: a domain specific language for compiler analysis

Philip Ginsbach, Lewis Crawford, Michael F. P. O'boyle

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

Abstract / Description of output

Optimizing compilers require sophisticated program analysis and transformations to exploit modern hardware. Implementing the appropriate analysis for a compiler optimization is a time consuming activity. For example, in LLVM, tens of thousands of lines of code are required to detect appropriate places to apply peephole optimizations. It is a barrier to the rapid prototyping and evaluation of new optimizations.
In this paper we present the Compiler Analysis Description Language (CAnDL), a domain specific language for compiler analysis. CAnDL is a constraint based language that operates over LLVM’s intermediate representation. The compiler developer writes a CAnDL program, which is then compiled by the CAnDL compiler into a C++ LLVM pass. It provides a uniform manner in which to describe compiler analysis and can be applied to a range of compiler analysis problems, reducing code length and complexity.
We implemented and evaluated CAnDL on a number of real world use cases: eliminating redundant operations; graphics code optimization; identifying static control flow regions. In all cases were we able to express the analysis more briefly than competing approaches.
Original languageEnglish
Title of host publicationProceedings of the 27th International Conference on Compiler Construction
PublisherACM
Pages151-162
Number of pages12
ISBN (Electronic)978-1-4503-5644-2
DOIs
Publication statusE-pub ahead of print - 28 Feb 2018
Event27th International Conference on Compiler Construction - Vienna, Austria
Duration: 24 Feb 201825 Feb 2018
https://cc-conference.github.io/18/

Conference

Conference27th International Conference on Compiler Construction
Abbreviated titleCC'18
Country/TerritoryAustria
CityVienna
Period24/02/1825/02/18
Internet address

Fingerprint

Dive into the research topics of 'CAnDL: a domain specific language for compiler analysis'. Together they form a unique fingerprint.

Cite this