mlirEvolve is a research framework designed to automate MLIR compiler development using LLM agents. It bridges the gap between raw compiler source code and AI agents by creating high-quality datasets and semantic knowledge graphs.
Extracts "Gold Standard" compiler recipes from git history (e.g., LLVM/IREE).
- Heuristic: Identifies atomic commits that modify Logic (C++/TableGen) and include verifying Tests (MLIR/LLVM IR).
- Noise Filtering: Automatically filters out merges, refactors, and formatting changes to ensure high-quality training data for agents.
Hydrates a Neo4j graph database with a deep semantic understanding of the codebase.
- SCIP Integration: Uses SCIP indexing to map definitions, references, and scopes.
- Graph Schema: Models complex relationships (
DEFINES,CALLS,HAS_NESTED) between Functions, Methods, Classes, and Files, enabling agents to query the codebase structure effectively.
Provides the necessary hooks for agents to interact with the compiler:
- Compiler Wrapper: robust execution of
iree-compilewith timeout handling and artifact management. - Verification: Automated checking of generated artifacts.
Create a virtual environment and install the package in editable mode:
python3 -m venv venv
source venv/bin/activate
pip install -e .