Edinburgh Research Archive

Precise control of compilers: a practical approach to principled optimization

dc.contributor.advisor
Steuwer, Michel
dc.contributor.advisor
Franke, Bjoern
dc.contributor.author
Lücke, Martin Paul
dc.date.accessioned
2025-07-14T09:52:01Z
dc.date.available
2025-07-14T09:52:01Z
dc.date.issued
2025-07-14
dc.description.abstract
Production compilers remain constrained by rigid designs and inflexible optimization strategies that limit their adaptation to evolving hardware designs and application requirements. While academic research continues to produce innovative compilation techniques and intermediate representations that enable more flexibility and control over the compilation process, bridging the gap between these theoretical advances and practical implementation remains a significant challenge. The emergence of the MLIR compiler infrastructure, with its extensible dialect-based architecture, presents a unique opportunity to address two fundamental challenges in modern compiler design: how to integrate principled representations of programs and transformations into production compilers and how to provide users with meaningful control over optimization decisions. For the representation challenge, we first integrate Rise, a functional pattern-based intermediate representation, as an MLIR dialect to establish the foundation for systematic rewrite-based optimizations in a production-ready compiler infrastructure. We demonstrate the practical utility of this integration by leveraging Rise's pattern-based abstractions to compile a machine learning model. While Rise's functional foundation provides natural guarantees about program properties during transformations, these are lost when integrating with MLIR's largely unconstrained rewriting system. Transformations do not guarantee the preservation of dialect-specific invariants or even the Static Single Assignment (SSA) form beyond dynamic checks. We present an approach for statically validating that a set of MLIR rewrites maintains these critical properties. For the control challenge, we introduce two distinct approaches to transformation control. The Transform dialect, now part of upstream MLIR, encodes optimization sequences as an MLIR dialect. It exposes previously hidden compiler optimizations, enabling developers to express complex transformation strategies directly in MLIR's infrastructure and moving beyond rigid pass pipelines to provide precise control over which optimizations are applied to specific parts of the program. To provide a principled foundation for composing complex optimization strategies, we adapt Elevate, a functional language for composing transformations, to the MLIR ecosystem. We extend Elevate with MLIR-specific constructs while making MLIR's IR immutable to enable both approaches to work in unison. This adaptation enables compiler developers to express sophisticated optimization strategies simply by composing rewrite rules. We show how this approach scales to flexibly match computational structures, such as attention, in machine learning models. By systematically addressing both representation and control challenges, we establish principled foundations for optimization while maintaining precise control, demonstrating how modern compiler infrastructures can evolve beyond rigid designs without sacrificing practical applicability.
en
dc.identifier.uri
https://hdl.handle.net/1842/43671
dc.identifier.uri
http://dx.doi.org/10.7488/era/6203
dc.language.iso
en
en
dc.publisher
The University of Edinburgh
en
dc.relation.hasversion
Mathieu Fehr, Michel Weber, Christian Ulmann, Alexan dre Lopoukhine, Martin Lücke, Théo Degioanni, Michel Steuwer, and Tobias Grosser. “Sidekick compilation with xDSL.” In: Accepted at the 2025 International Symposium on Code Generation and Optimization, CGO 2025.
en
dc.relation.hasversion
Martin Lücke. “Fine Grained Control of Program Transformations via Strategic Rewriting in MLIR.” International Symposium on Code Generation and Optimization (CGO) Student Research Competition. 2021.
en
dc.relation.hasversion
Martin Lücke, Michel Steuwer, and Aaron Smith. “Integrating a functional pattern-based IR into MLIR.” In: Proceedings of the 30th ACM SIGPLAN International Conference on Compiler Construction. CC 2021. Virtual, Republic of Korea: Association for Computing Machinery, 2021, pp. 12–22.
en
dc.relation.hasversion
Martin Lücke, Michel Steuwer, and Aaron Smith. “A functional pattern-based language in mlir.” In: 2nd Workshop on Accelerated Machine Learning@ ISCA 2020.
en
dc.relation.hasversion
Martin Paul Lücke, Oleksandr Zinenko, William S. Moses, Michel Steuwer, and Albert Cohen. “The MLIR Transform Dialect. Your compiler is more powerful than you think.” In: Accepted at the 2025 International Symposium on Code Generation and Optimization, CGO 2025
en
dc.rights.license
Attribution 4.0 International CC BY 4.0 Deed
en
dc.rights.uri
https://creativecommons.org/licenses/by/4.0/
en
dc.subject
compilers
en
dc.subject
larger computational pattern
en
dc.subject
translation strategies
en
dc.subject
program efficiency
en
dc.subject
MLIR
en
dc.subject
systematic rewrite-based optimizations
en
dc.subject
Static Single Assignment
en
dc.subject
transformation control
en
dc.subject
compiler optimizations
en
dc.subject
Elevate
en
dc.title
Precise control of compilers: a practical approach to principled optimization
en
dc.type
Thesis or Dissertation
en
dc.type.qualificationlevel
Doctoral
en
dc.type.qualificationname
PhD Doctor of Philosophy
en

Files

Original bundle

Now showing 1 - 1 of 1
Name:
Lücke2025.pdf
Size:
7.07 MB
Format:
Adobe Portable Document Format
Description:

This item appears in the following Collection(s)