Skip to content
0:00 / 0:00

#mlir#llvm#compilerinfrastructure

2019 EuroLLVM Developers’ Meeting: T. Shpeisman & C. Lattner “MLIR: Multi-Level Intermediate Repr..”

LLVM

18K subscribers • 15 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Tatiana Shpeisman and Chris Lattner
  • Linked in the descriptionSlides on llvm.org

Advanced. Deep dive for people who know the field.

38K views7 years ago1 recommendation

Systems programmingProgramming languagesCompilers and interpretersPerformance and optimization

Tatiana Shpeisman and Chris Lattner introduce MLIR, a flexible and extensible intermediate representation designed for modern compiler infrastructure.

llvm.org/devmtg/2019-04/ — MLIR: Multi-Level Intermediate Representation for Compiler Infrastructure - Tatiana Shpeisman (Google), Chris Lattner (Google) Slides: llvm.org/devmtg/2019-04/slides/Keynote-ShpeismanLattner-MLIR… — This talk will give an overview of Multi-Level Intermediate Representation - a new intermediate representation designed to provide a unified, flexible and extensible intermediate representation that is language-agnostic and can be used as a base compiler infrastructure. MLIR shares similarities with traditional CFG-based three-address SSA representations (including LLVM IR or SIL), but it also introduces notions from the polyhedral domain as first class concepts. The notion of dialects is a core concept of MLIR extensibility, allowing multiple levels in a single representation. MLIR supports the continuous lowering from dataflow graphs to high-performance target specific code through partial specialization between dialects. We will illustrate in this talk how MLIR can be used to build an optimizing compiler infrastructure for deep learning applications. MLIR supports multiple front- and back-ends and uses LLVM IR as one of its primary code generation targets. MLIR also relies heavily on design principles and practices developed by the LLVM community. For example, it depends on LLVM APIs and programming idioms to minimize IR size and maximize optimization efficiency. MLIR uses LLVM testing utilities such as FileCheck to ensure robust functionality at every level of the compilation stack, TableGen to express IR invariants, and it leverages LLVM infrastructure such as dominance analysis to avoid implementing all the necessary compiler functionalities from scratch. At the same time, it is a brand new IR, both more restrictive and more general than LLVM IR in different aspects of its design. We believe that the LLVM community will find in MLIR a useful tool for developing new compilers, especially in machine learning and other high-performance domains. — Videos Filmed & Edited by Bash Films: BashFilms.com

Why it's here

1 person recommends this

What people say. Recommended as the definitive introduction to MLIR and its design goals.

Moments people linked to

u/jrtc27in r/compsci • Recommends

On “MLIR (a Google Project) : Redefining the compiler infrastructure”

…d` on an AST node). How are you going to optimise something you haven’t even parsed? Moreover, what on earth does library-specific optimisation even *mean*, other than perhaps C/C++ standard library knowledge embedded in the compiler? EDIT: If anyone wants to actually learn about MLIR they should go look at the talk given at this year’s EuroLLVM (link to this video3, slides4). 1: https://clang.llvm.org/docs/IntroductionToTheClangAST.html 2: https://clang.llvm.org/doxygen/classclang_1_1Stmt.html#a6844392ee6148b5fe821f211b95e5d1b 3: link to this video 4: http://llvm.org/devmtg/2019-04/slides/Keynote-ShpeismanLattner-MLIR.pdf…

u/cxzukin r/ProgrammingLanguages • Mentions

On “Are there optimizations that can only be performed on the AST?”

Hi Chri4, The short answer is no - there are no optimizations that can be performed on the AST that can't be performed later on. Lets dig a bit deeper. Paul Kelly's skiing metaphor is great at highlighting the big picture. At each stage of the compiler, we're accumulating more information, this accumulation can result in a central structure. E.g. AST hold syntax information, then we potentially gather type information into a symbol table, then expression information into an IR, then value information. Optimisations work at a given level of information. E.g. Common Subexpression Elimination on expressions. Global Value Numbering on values. But these overlap - They can capture the same tr…
18View on Reddit

u/csb06bluebirdin r/ProgrammingLanguages • Mentions

On “January 2022 monthly "What are you working on?" thread”

Happy New Year! I am working some again on my Ada-like language bluebird. I am making another attempt to use MLIR as an intermediate IR between the AST and LLVM IR (I made a brief attempt a few months ago just to look into it). I had the basic constructs of my language (e.g. if/else blocks, while loops, expressions, etc.) implemented in my original code generator, which lowers directly to LLVM IR from the AST, but as I started to think about how to implement more complex features like generics, I realized that I would either have to implement a lot of complex transformations on the AST directly (like Clang does) or else implement a custom intermediate IR. I saw this talk by Chris Lattner…