XBLang: An Extensible Compiler Infrastructure Based on MLIR

PI: Sunita Chandrasekaran

Students: Fabian Mora

Collaborators: UDEL: Felipe Cabarcas; Lawrence Livermore National Laboratory: Johannes Doerfert

Funding Agency and Period: National Science Foundation (NSF) 1814609 and 10/01/2018 – 09/30/2023

Project Duration: 08/01/2019 - Present

Project Summary: The goal of this research project is to develop a compiler infrastructure that facilitates research on programming abstractions, compiler optimizations, parallel programming models, and compiler construction.

For this purpose, recently, we have designed XBLang, a compiler infrastructure developed on top of the widely-used MLIR compiler infrastructure. XBLang uses a novel approach where the traditional Abstract Syntax Tree (AST) used in compiler frontends is replaced by an MLIR representation. This approach proves extremely powerful as it allows the use of all the machinery available in MLIR to analyze, optimize, and introduce new programming abstractions.

Furthermore, the XBLang infrastructure enables building compiler implementations for domain-specific and programming languages. To demonstrate this, we created a reference language and implemented the compiler. This reference language is highly suited for research, as it allows the introduction of runtime plugins to extend the language, meaning researchers can easily introduce new programming abstractions into this language.

On top of this new programming language, we are creating a parallel programming model to study how simplifying directive-based programming models like OpenMP or OpenACC can result in more performant code while retaining portability.

GitHub: The GitHub repository is available here: https://github.com/fabianmcg/xblang