スキル一覧に戻る
onbjerg

cargo-llvm-lines

by onbjerg

dotfiles

4🍴 1📅 2026年1月19日
GitHubで見るManusで実行

SKILL.md


name: cargo-llvm-lines description: Analyzes LLVM IR to find monomorphization bloat and compile time hotspots. Use when debugging slow builds, reducing binary size, or optimizing generic code.

cargo-llvm-lines

Shows which functions generate the most LLVM IR lines, indicating compile time and binary size contributors.

Usage

cargo llvm-lines [OPTIONS]

Common Workflows

Analyze library crate

cargo llvm-lines --lib

Analyze specific binary

cargo llvm-lines --bin my_bin

Sort by copy count (monomorphization)

cargo llvm-lines --lib --sort copies

Filter to specific functions

cargo llvm-lines --lib | grep "my_module"

Key Options

  • --lib - Analyze library target
  • --bin <NAME> - Analyze specific binary
  • --release - Use release profile
  • --sort lines|copies - Sort by IR lines (default) or instantiation count

Reading Output

Output format: Lines | Copies | Function

  Lines  Copies  Function name
  -----  ------  -------------
  30000     100  core::fmt::write
   5000      50  alloc::vec::Vec<T>::push
  • Lines - Total LLVM IR lines from all instantiations
  • Copies - Number of monomorphized copies
  • High copies with moderate lines = monomorphization bloat

Common Fixes

  • Extract non-generic inner functions to reduce copies
  • Use dyn Trait instead of generics for cold paths
  • Consider #[inline(never)] on large generic functions

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です