Extending Futhark's Backend: Not Easy, But Not Impossible
2025-03-28
This post delves into the complexities of adding a new backend to the Futhark compiler. Futhark uses a staged compilation process: the frontend parses and type-checks, the middle-end optimizes and transforms, and the backend translates the intermediate representation (IR) to target code. Backend implementation isn't a simple tutorial; it involves multiple IR dialects and a deep understanding of internal APIs. The author suggests choosing the appropriate IR dialect based on the target language's level of abstraction and leveraging existing infrastructure to simplify development. The ultimate goal is a new backend invokable via the command line.
Development
backend development