Sidekick compilation with xDSL

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Fehr, Mathieu, Weber, Michel, Ulmann, Christian, Lopoukhine, Alexandre, Lücke, Martin, Degioanni, Théo, Steuwer, Michel, Grosser, Tobias
Format: Preprint
Published: 2023
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916289080983552
author Fehr, Mathieu
Weber, Michel
Ulmann, Christian
Lopoukhine, Alexandre
Lücke, Martin
Degioanni, Théo
Steuwer, Michel
Grosser, Tobias
author_facet Fehr, Mathieu
Weber, Michel
Ulmann, Christian
Lopoukhine, Alexandre
Lücke, Martin
Degioanni, Théo
Steuwer, Michel
Grosser, Tobias
contents Traditionally, compiler researchers either conduct experiments within an existing production compiler or develop their own prototype compiler; both options come with trade-offs. On one hand, prototyping in a production compiler can be cumbersome, as they are often optimized for program compilation speed at the expense of software simplicity and development speed. On the other hand, the transition from a prototype compiler to production requires significant engineering work. To bridge this gap, we introduce the concept of sidekick compiler frameworks, an approach that uses multiple frameworks that interoperate with each other by leveraging textual interchange formats and declarative descriptions of abstractions. Each such compiler framework is specialized for specific use cases, such as performance or prototyping. Abstractions are by design shared across frameworks, simplifying the transition from prototyping to production. We demonstrate this idea with xDSL, a sidekick for MLIR focused on prototyping and teaching. xDSL interoperates with MLIR through a shared textual IR and the exchange of IRs through an IR Definition Language. The benefits of sidekick compiler frameworks are evaluated by showing on three use cases how xDSL impacts their development: teaching, DSL compilation, and rewrite system prototyping. We also investigate the trade-offs that xDSL offers, and demonstrate how we simplify the transition between frameworks using the IRDL dialect. With sidekick compilation, we envision a future in which engineers minimize the cost of development by choosing a framework built for their immediate needs, and later transitioning to production with minimal overhead.
format Preprint
id arxiv_https___arxiv_org_abs_2311_07422
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Sidekick compilation with xDSL
Fehr, Mathieu
Weber, Michel
Ulmann, Christian
Lopoukhine, Alexandre
Lücke, Martin
Degioanni, Théo
Steuwer, Michel
Grosser, Tobias
Programming Languages
Traditionally, compiler researchers either conduct experiments within an existing production compiler or develop their own prototype compiler; both options come with trade-offs. On one hand, prototyping in a production compiler can be cumbersome, as they are often optimized for program compilation speed at the expense of software simplicity and development speed. On the other hand, the transition from a prototype compiler to production requires significant engineering work. To bridge this gap, we introduce the concept of sidekick compiler frameworks, an approach that uses multiple frameworks that interoperate with each other by leveraging textual interchange formats and declarative descriptions of abstractions. Each such compiler framework is specialized for specific use cases, such as performance or prototyping. Abstractions are by design shared across frameworks, simplifying the transition from prototyping to production. We demonstrate this idea with xDSL, a sidekick for MLIR focused on prototyping and teaching. xDSL interoperates with MLIR through a shared textual IR and the exchange of IRs through an IR Definition Language. The benefits of sidekick compiler frameworks are evaluated by showing on three use cases how xDSL impacts their development: teaching, DSL compilation, and rewrite system prototyping. We also investigate the trade-offs that xDSL offers, and demonstrate how we simplify the transition between frameworks using the IRDL dialect. With sidekick compilation, we envision a future in which engineers minimize the cost of development by choosing a framework built for their immediate needs, and later transitioning to production with minimal overhead.
title Sidekick compilation with xDSL
topic Programming Languages
url https://arxiv.org/abs/2311.07422