llvm-compiler-architecture
Use this skill when the user says 'LLVM', 'LLVM IR', 'compiler backend', 'optimization pass', 'frontend/backend separation', 'SSA IR'. Explains LLVM's…
от j4flmao★ 47 звёзд на GitHub
Установить llvm-compiler-architecture в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
LLVM Compiler Architecture
Purpose
Explain LLVM's modular compiler architecture: the frontend/optimizer/backend three-phase split, the SSA-form LLVM IR as the common interface, and how optimization and codegen passes transform it.
Agent Protocol
Trigger
User phrases: "LLVM IR", "three-phase compiler", "optimization pass", "SSA form", "target backend".
Input Context
- Source language / frontend (Clang, rustc).
- Target architecture.
Output Artifact
Architecture explanation and pass-pipeline guidance.
Response Format
Phase: {frontend | optimizer | backend}
IR: {SSA, typed}
Pass: {analysis | transform}
Core Mechanics
LLVM is a collection of modular and reusable compiler and toolchain technologies. It is the backend for Rust, Swift, and modern C/C++ (Clang).
1. The Three-Phase Design
Unlike monolithic compilers, LLVM strictly separates concerns:
- Frontend (e.g., Clang): Parses source code (C++, Rust), builds an Abstract Syntax Tree (AST), and translates it into LLVM IR.
- Optimizer: Takes LLVM IR, applies language-independent optimizations (dead code elimination, loop unrolling), and outputs optimized IR.
- Backend (Code Generator): Translates optimized IR into target-specific machine code (x86, ARM, WebAssembly).
2. LLVM IR (Intermediate Representation)
A strongly typed, RISC-like virtual instruction set. It uses SSA (Static Single Assignment) form, meaning every variable is assigned exactly once, making data flow analysis for optimizations mathematically trivial.
Compiler Flow Map
%%{init: {"theme": "default", "flowchart": {"useMaxWidth": true}}}%%
flowchart TD
subgraph Frontend ["Frontend (Language Specific)"]
A["Source Code (Rust/C)"]
B["Lexer / Parser"]
C["AST (Abstract Syntax Tree)"]
end
subgraph MiddleEnd ["Optimizer (LLVM Core)"]
D["LLVM IR (Unoptimized)"]
E["Optimization Passes"]
F["LLVM IR (Optimized)"]
end
subgraph Backend ["Backend (Hardware Specific)"]
G["Instruction Selection"]
H["Register Allocation"]
I["Machine Code (x86 / ARM)"]
end
A --> B
B --> C
C -->|"Emit IR"| D
D --> E
E --> F
F --> G
G --> H
H --> I
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл llvm-compiler-architecture?
Use this skill when the user says 'LLVM', 'LLVM IR', 'compiler backend', 'optimization pass', 'frontend/backend separation', 'SSA IR'. Explains LLVM's three-phase design, SSA-form IR, and the pass pipeline. Do NOT use for: eBPF bytecode specifics (use niche/low-level/ebpf-xdp-networking) or language-specific syntax.
Как установить скилл llvm-compiler-architecture?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл llvm-compiler-architecture запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…