A Domain-Specic Language for Generating Datao w Analyzers

Jia Zeng, Chuck Mitchell, Stephen A. Edwards · 2006

Datao w analysis is a well-understood and very powerful technique for analyzing programs as part of the compilation process. Virtually all compilers use some sort of datao w analysis as part of their optimization phase. However, despite being well-understood theoretically, such analyses are often dicult to code, making it dicult to quickly experiment with variants. To address this, we developed a domain-specic language, Analyzer Generator (AG), that synthesizes datao w analysis phases for Microsoft’s Phoenix compiler framework. AG hides the fussy details needed to make analyses modular, yet generates code that is as ecien t as the hand-coded equivalent. One key construct we introduce allows IR object classes to be extended without recompiling. Experimental results on three analyses show that AG code can be one-tenth the size of the equivalent handwritten C++ code with no loss of performance. It is our hope that AG will make developing new datao w analyses much easier.

Read the paper · More papers on PaperTik