Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Compiler Optimization Theory

ASecurity

Use when 解释或评估 CinderX 的 IR、优化 pass、指令调度与寄存器分配原理;指令规格用 isa-instruction-lookup。

2 stars
0 votes
0 copies
0 views
Added 9/20/2026
documentationgo

Works with

mcp

Security Analysis

A100/100

Scanned 9/20/2026

Install to Claude Code

$npx -y skills add sisibeloved/cpython-optimize-skill --skill compiler-optimization-theory --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Compiler Optimization Theory?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Compiler Optimization Theory
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sisibeloved-compiler-optimization-theory/badge)](https://www.skillsdirectory.com/skills/sisibeloved-compiler-optimization-theory)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: compiler-optimization-theory
description: Use when 解释或评估 CinderX 的 IR、优化 pass、指令调度与寄存器分配原理;指令规格用 isa-instruction-lookup。
---

# Compiler Optimization Theory

编译器中后端理论背景,供理解与评估 CinderX 的 IR、优化、调度、寄存器分配设计。
是"读后内化"型知识,与 `isa-instruction-lookup`(查规格)分工不同:
这里回答"为什么这样设计、有哪些方案、取舍是什么",不回答"某指令编码是什么"。

## 来源声明

基于 Cooper & Torczon《Engineering a Compiler》**2nd edition**(Elsevier 2012)
PDF 逐章校对的概念提炼,引用到小节级(各 reference 头部标注 PDF 页码,
印刷页 ≈ PDF−25)。算法细节以该书为准。
linear scan / PBQP 不在本书 2e 正文,相关条目已单独标注原始文献出处。

## 何时读哪个

| 问题形态 | 读 |
|---|---|
| HIR/LIR 为什么分层?SSA 有什么好处?IR 设计的取舍轴? | `references/intermediate-representations.md` |
| 某优化 pass 在做什么、为什么有效、pass 顺序怎么排? | `references/optimization-fundamentals.md` |
| 机器码为什么这样排?延迟/占用率怎么权衡?循环怎么调度? | `references/instruction-scheduling.md` |
| spill 为什么发生?图着色 vs 线性扫描?move elimination? | `references/register-allocation.md` |

## 与现有技能的衔接

- 读 CinderX HIR/LIR dump 时:`cinderx-hir-lir-analyze` 负责取证据,本技能提供
  "这段 IR 形态说明编译器在做什么"的理论判读框架。
- 评审 JIT 改动时:`cinderx-jit-review` 负责正确性风险清单,本技能帮助判断
  "这个优化在编译理论上的前置条件是否满足"。
- 涉及具体指令行为/编码:一律转 `isa-instruction-lookup` 查库,本技能不覆盖。

## 理论 → 查证 硬规则(不可跳过)

本技能只回答"为什么这样设计、有哪些方案、取舍是什么"。**分析中一旦落到具体指令,
必须按"查证问题"调 `isa-reference` MCP。查证主体是语义与用法,不是分类和
feature**:category 只用于同名消歧(ABS 三域),`filter_by_environment` 只在
环境部署判定时用——优化替换经常**跨 category、跨 feature 域**(base 需求用
SIMD 指令满足、SVE 指令替换 base 序列都合法),候选检索不得被分类过滤。

| 查证问题 | 怎么查(工具 + 必做的比对动作) |
|---|---|
| **语义核对**:方案假设指令做 X(如"CSEL 无条件写 Rd"),它真的做 X 吗 | `lookup_instruction(mnemonic, verbose=True)` → **逐条读 `operation_pseudocode` 与方案的语义假设比对**;不一致即方案错误,不得当备注带过 |
| **用法核对**:这条汇编/lowering 写法合法吗、有什么编码陷阱 | 同上 verbose → 核对 `asm_templates`(合法语法形态)与 `operand_docs`(操作数约束:宽度限制、内存源语义、编码位要求)——陷阱在这里暴露(如 CMOVcc 不支持 8-bit 目的、内存源被无条件读) |
| **更优写法发现**:有没有语义一致但更高效的替换 | 按语义检索候选:`find_instruction_by_function` + `optimization-intent-map.md`(**跨 category/feature 不设限**)→ 每个候选取伪代码**比对语义一致** → 比较指令数/依赖链/副作用;微架构收益须 perf 证据 |
| **环境部署判定**(仅在确认目标机器支持时) | `filter_by_environment(env_features)`,feature 列表来自环境审计 |

判据:**方案对指令行为的每条语义假设,必须能在该指令 `operation_pseudocode`
里指出对应行;用法断言必须对应 `asm_templates`/`operand_docs` 条目**。
只回答"某指令是 base 类、无 feature 依赖"**不构成查证**——那只是可用性,
回答不了"语义符不符、用法对不对、有没有更优写法"。

## 边界

- 本技能是背景框架,不替代对 CinderX 实际代码的证据检查。
- 教材讲通用编译器;CinderX 的具体实现(Tiering、deopt、inline cache)以
  CinderX 代码和测试为准,理论只提供解释框架,不能作为 CinderX 行为的论据。

Attribution

sisibelovedsisibeloved
View sourceMore from sisibeloved →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Context Fundamentals

Understand the components, mechanics, and constraints of context in agent systems. Use when designing agent architectures, debugging context-related failures, or optimizing context usage.

179001 votes

release-notes

Draft release notes and changelog entries from git history or merged PRs between two refs (tags/SHAs/branches), including breaking changes, migrations, and upgrade steps. Use when the user asks for release notes, changelog updates, or a GitHub Release draft.

1301 votes

docs-style-guide

Documentation style guide enforcer by @planetabhi. Applies and reviews the writing style guide when authoring or editing product documentation and tutorials. Use to check prose for voice, tense, word choice, inclusive language, formatting, code block, UI, Markdown, and number/date conventions.

11 votes

Caveman Help

Quick-reference card for all caveman modes, skills, and commands. One-shot display, not a persistent mode. Trigger: /caveman-help, "caveman help", "what caveman commands", "how do I use caveman".

1023330 votes

How It Works

Explain how claude-mem captures observations, when memory injection kicks in, and where data lives. Use when the user asks "how does claude-mem work?" or "what is this thing doing?".

942310 votes
View all in documentation →