4  MLIR Terminology And Core Concepts

This section is the working vocabulary for reading and writing MLIR. The pages are deliberately connected: operations produce values; values carry types; blocks and regions organize them; dialects define their semantics; passes, analyses, and conversion frameworks transform them under explicit invariants.

4.1 How To Read These Chapters

Start with Operation, Value, Type, Block, and Region. They explain the in-memory shape behind the printed syntax. Then read Dialect, Trait, Interface, Symbol, and Verification to understand who owns a construct and what generic infrastructure is allowed to assume.

The second half concerns change. A compiler pass does not simply edit text: analyses establish preconditions, patterns mutate use-def graphs through a rewriter, and dialect conversion enforces legality while types change. Effects, aliasing, and ownership constrain what may be moved or removed.

4.2 A Compact Mental Model

module
  symbol operations such as functions
    regions
      blocks
        operations
          results and operands: SSA values
          attributes/properties: static configuration
          nested regions or CFG successors

Every level adds a contract. A malformed result type, a missing branch argument, an invalid yield, or a dangling symbol reference may appear local but can break the assumptions of a later analysis or lowering pass. Verification is the continuous check that those contracts still hold.

4.3 Study Order

Read the pages in book order for a ground-up model. When debugging a real pipeline, use them by question instead: What is this operation? Is this value in scope? Which type boundary changed? Can this move across a store? Is this operation legal after conversion? That question-driven reading is how these concepts become practical compiler tools.

The dialect chapters that follow this section apply the same vocabulary to concrete MLIR dialects and their operations, passes, and lowering roles.