mlir-development

Develop MLIR dialects and passes for transforming compiler IR.

69|11|Updated May 16, 2026
One-click install
npx skills add https://github.com/NeverSight/NeverC --skill mlir-development-neversight
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mlir-development
Source: https://github.com/NeverSight/NeverC/tree/main/.agents/skills/mlir-development
Command: npx skills add https://github.com/NeverSight/NeverC --skill mlir-development-neversight

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

MLIR development helps you design and implement domain-specific compilation pipelines by transforming high-level program intent into progressively optimized intermediate representations.

Core Features & Use Cases

  • Create custom dialects: Define new operations, types, and attributes using MLIR’s dialect architecture for domain-specific modeling.
  • Write transformations and passes: Implement optimization passes and pattern-based rewrites to safely transform IR while preserving semantics.
  • Perform dialect conversion: Lower high-level dialects to mid-level or LLVM-like dialects using conversion targets and conversion patterns.
  • Use CIR for C/C++: Leverage CIR’s MLIR-based representation to improve tooling and apply language-aware transformations.
  • Common use cases: Build a compiler for a DSL, prototype optimization pipelines, or create an ML compiler stack that progressively lowers into target code.

Quick Start

Use the mlir-development skill to guide you through defining a custom dialect, implementing an optimization rewrite pattern, and lowering the dialect to a lower-level dialect in a single pass.

Frequently Asked Questions about mlir-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define a custom dialect in MLIR for a domain-specific language?▼

Defining a custom MLIR dialect involves specifying new operations, types, and attributes using ODS to model domain-specific program intent. This structure enables hierarchical IR reuse for domain-specific compilation pipelines.

What is the best way to lower high-level MLIR dialects to LLVM-like representations?▼

Lowering high-level MLIR dialects requires using conversion targets and conversion patterns to progressively transform IR. This semantics-preserving process lowers operations into mid-level or LLVM-like dialects for target code generation.

How do pattern rewriting and passes work for optimizing compiler IR in MLIR?▼

MLIR passes and pattern rewriting transform and optimize compiler IR by applying targeted rewrites. These pattern-based rewrites safely modify operations while preserving program semantics during optimization.

Can I use MLIR and CIR representations for C and C++ language-aware transformations?▼

Yes, leveraging CIR's MLIR-based representation improves tooling and applies language-aware transformations for C/C++. It uses MLIR infrastructure to represent and manipulate C/C++ code structures effectively.

When do I need progressive lowering across multiple MLIR dialects?▼

Progressive lowering is needed when building a compiler stack that transforms high-level program intent into progressively optimized intermediate representations. It bridges domain-specific modeling and target code generation across dialects.

Does MLIR dialect conversion support semantics-preserving transformations for high-level compilation pipelines?▼

Yes, MLIR dialect conversion supports semantics-preserving transformations for high-level compilation pipelines. It uses conversion targets and rewrite patterns to safely lower operations across dialect hierarchies.