# mlir

MLIR is a compiler intermediate representation and extensible compiler infrastructure for representing, analyzing, transforming, and progressively lowering code from high-level dataflow graphs to target-specific code.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Integer Set Library (ISL) - A Primer

DevFeed: [Integer Set Library (ISL) - A Primer](<https://devfeed.tech/articles/integer-set-library-isl-a-primer-40491.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2025/10/19/isl-a-primer/>)

Published: 2025-10-19T20:14:22Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Library](<https://devfeed.tech/topics/library.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [compilers](<https://devfeed.tech/topics/compilers.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [mlir](<https://devfeed.tech/topics/mlir.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [isl](<https://devfeed.tech/tags/isl.md>), [library](<https://devfeed.tech/tags/library.md>), [loops](<https://devfeed.tech/tags/loops.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [mlir](<https://devfeed.tech/tags/mlir.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [polyhedral-optimization](<https://devfeed.tech/tags/polyhedral-optimization.md>), [programming](<https://devfeed.tech/tags/programming.md>), [set-theory](<https://devfeed.tech/tags/set-theory.md>)

### AI overview

This primer introduces the Integer Set Library (ISL), an open-source C library that implements core algorithms for polyhedral optimization. It focuses on representing integer sets and relations, manipulating them, and the relationship between ISL and MLIR's Fast Presburger Library.

### Source excerpt

Polyhedral optimization is a tool used in compilers for optimizing loop nests. While the major compilers that use this implement polyhedral optimizations from scratch,1 there is a generally-applicable open source C library called the Integer Set Library (ISL) that implements the core algorithms used in polyhedral optimization. This article gives an overview of a subset of ISL, mainly focusing on the representation of sets and relations and basic manipulations on them.

## Polynomial dialect and mlir-opt tutorial upstreamed

DevFeed: [Polynomial dialect and mlir-opt tutorial upstreamed](<https://devfeed.tech/articles/polynomial-dialect-and-mlir-opt-tutorial-upstreamed-40507.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/shortform/2024-08-02-1551/>)

Published: 2024-08-02T22:51:23Z

Content type: article

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [mlir](<https://devfeed.tech/topics/mlir.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [debug](<https://devfeed.tech/topics/debug.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [math](<https://devfeed.tech/topics/math.md>), [LLVM](<https://devfeed.tech/topics/llvm.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [math](<https://devfeed.tech/tags/math.md>), [mlir](<https://devfeed.tech/tags/mlir.md>), [shortform](<https://devfeed.tech/tags/shortform.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

The author describes upstreaming compiler work to MLIR, including a tutorial on mlir-opt for debugging MLIR pass pipelines and the beginning of a polynomial math dialect. They also discuss planned polynomial approximation passes that would track approximation error in the IR.

### Source excerpt

I've been upstreaming a bit of my compiler work to the MLIR project. Yesterday, I merged in a tutorial on mlir-opt, the main debugging tool for running passes on MLIR code. This is roughly the upstreamable parts of my first MLIR tutorial entry, MLIR -- Running and Testing a Lowering. Mehdi Amini also provided a lot of useful information during review that taught me some stuff I didn't know about the tool.

## MLIR -- Lowering through LLVM

DevFeed: [MLIR -- Lowering through LLVM](<https://devfeed.tech/articles/mlir-lowering-through-llvm-40480.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2023/11/01/mlir-lowering-through-llvm/>)

Published: 2023-11-01T07:00:00Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [mlir](<https://devfeed.tech/topics/mlir.md>), [LLVM](<https://devfeed.tech/topics/llvm.md>), [x86](<https://devfeed.tech/topics/x86.md>)

Tags: [compilers](<https://devfeed.tech/tags/compilers.md>), [heir](<https://devfeed.tech/tags/heir.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [mlir](<https://devfeed.tech/tags/mlir.md>), [pipeline](<https://devfeed.tech/tags/pipeline.md>), [primer](<https://devfeed.tech/tags/primer.md>), [programming](<https://devfeed.tech/tags/programming.md>), [x86](<https://devfeed.tech/tags/x86.md>)

### AI overview

A tutorial on lowering a custom MLIR poly dialect through the LLVM dialect, exporting LLVM IR, and compiling it to x86 machine code. It explains how to construct and incrementally develop MLIR lowering pipelines.

### Source excerpt

Table of Contents In the last article we lowered our custom poly dialect to standard MLIR dialects. In this article we'll continue lowering it to LLVM IR, exporting it out of MLIR to LLVM, and then compiling to x86 machine code. The code for this article is in this pull request, and as usual the commits are organized to be read in order. Defining a Pipeline The first step in lowering to machine code is to lower to an "exit dialect.

## MLIR -- Verifiers

DevFeed: [MLIR -- Verifiers](<https://devfeed.tech/articles/mlir-verifiers-40475.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2023/09/13/mlir-verifiers/>)

Published: 2023-09-13T09:00:00Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [mlir](<https://devfeed.tech/topics/mlir.md>), [Code](<https://devfeed.tech/topics/code.md>), [Pull Request](<https://devfeed.tech/topics/pull-request.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [canonicalization](<https://devfeed.tech/tags/canonicalization.md>), [code](<https://devfeed.tech/tags/code.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [mlir](<https://devfeed.tech/tags/mlir.md>), [operations](<https://devfeed.tech/tags/operations.md>), [pass](<https://devfeed.tech/tags/pass.md>), [primer](<https://devfeed.tech/tags/primer.md>), [programming](<https://devfeed.tech/tags/programming.md>), [pull-request](<https://devfeed.tech/tags/pull-request.md>), [safety](<https://devfeed.tech/tags/safety.md>), [types](<https://devfeed.tech/tags/types.md>)

### AI overview

This tutorial explains how to add verifiers to an MLIR dialect. Verifiers check that types and operations are well-formed before and after passes, enforcing operation invariants and allowing passes to avoid repeated edge-case checks. It also describes trait-based verification, generated type-checking and inference support, assembly-format simplification, builders, and related test updates.

### Source excerpt

Table of Contents Last time we defined folders and used them to enable some canonicalization and the sccp constant propagation pass for the poly dialect. This time we'll add some additional safety checks to the dialect in the form of verifiers. The code for this article is in this pull request, and as usual the commits are organized to be read in order. Purpose of a verifier Verifiers ensure the types and operations in a concrete MLIR program are well-formed.

## MLIR -- Writing Our First Pass

DevFeed: [MLIR -- Writing Our First Pass](<https://devfeed.tech/articles/mlir-writing-our-first-pass-40470.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2023/08/10/mlir-writing-our-first-pass/>)

Published: 2023-08-10T14:39:42Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [mlir](<https://devfeed.tech/topics/mlir.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>), [API](<https://devfeed.tech/topics/api.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [canonicalization](<https://devfeed.tech/tags/canonicalization.md>), [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [mlir](<https://devfeed.tech/tags/mlir.md>), [optimize](<https://devfeed.tech/tags/optimize.md>), [programming](<https://devfeed.tech/tags/programming.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

This tutorial introduces MLIR pass development through the HEIR project. It explains how to create a custom tool for an out-of-tree MLIR project and implement simple passes, including loop unrolling and instruction replacement, using the MLIR API and pass infrastructure.

### Source excerpt

Table of Contents This series is an introduction to MLIR and an onboarding tutorial for the HEIR project. Last time we saw how to run and test a basic lowering. This time we will write some simple passes to illustrate the various parts of the MLIR API and the pass infrastructure. As mentioned previously, the main work in MLIR is defining passes that either optimize part of a program, lower from parts of one dialect to others, or perform various normalization and canonicalization operations.

## MLIR -- Getting Started

DevFeed: [MLIR -- Getting Started](<https://devfeed.tech/articles/mlir-getting-started-40467.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2023/08/10/mlir-getting-started/>)

Published: 2023-08-10T14:32:33Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [mlir](<https://devfeed.tech/topics/mlir.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [toolchain](<https://devfeed.tech/topics/toolchain.md>), [FHE](<https://devfeed.tech/topics/fhe.md>), [LLVM](<https://devfeed.tech/topics/llvm.md>), [Google](<https://devfeed.tech/topics/google.md>), [monorepo](<https://devfeed.tech/topics/monorepo.md>)

Tags: [build](<https://devfeed.tech/tags/build.md>), [build-system](<https://devfeed.tech/tags/build-system.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [documentation](<https://devfeed.tech/tags/documentation.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [fhe](<https://devfeed.tech/tags/fhe.md>), [github-repository](<https://devfeed.tech/tags/github-repository.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [mlir](<https://devfeed.tech/tags/mlir.md>), [monorepo](<https://devfeed.tech/tags/monorepo.md>), [programming](<https://devfeed.tech/tags/programming.md>), [toolchain](<https://devfeed.tech/tags/toolchain.md>)

### AI overview

This introductory article explains the structure of a typical MLIR project and the build system used in the HEIR project, a Google effort focused on production engineering tools for Fully Homomorphic Encryption. It also introduces the relationship between MLIR and LLVM and describes pinning the MLIR dependency to a specific commit hash.

### Source excerpt

Table of Contents As we announced recently, my team at Google has started a new effort to build production-worthy engineering tools for Fully Homomorphic Encryption (FHE). One focal point of this, and one which I'll be focusing on as long as Google is willing to pay me to do so, is building out a compiler toolchain for FHE in the MLIR framework (Multi-Level Intermediate Representation). The project is called Homomorphic Encryption Intermediate Representation, or HEIR.