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.
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 language | English |
---|---|
Title of host publication | Proceedings of the 27th International Conference on Compiler Construction |
Publisher | ACM |
Pages | 151-162 |
Number of pages | 12 |
ISBN (Electronic) | 978-1-4503-5644-2 |
DOIs | |
Publication status | E-pub ahead of print - 28 Feb 2018 |
Event | 27th International Conference on Compiler Construction - Vienna, Austria Duration: 24 Feb 2018 → 25 Feb 2018 https://cc-conference.github.io/18/ |
Conference
Conference | 27th International Conference on Compiler Construction |
---|---|
Abbreviated title | CC'18 |
Country/Territory | Austria |
City | Vienna |
Period | 24/02/18 → 25/02/18 |
Internet address |