dead-code-eliminator

Eliminate unreachable and unused code segments from programs.

17|2|Updated Feb 16, 2026
One-click install
npx skills add https://github.com/rainoftime/pl-skills --skill dead-code-eliminator-rainoftime
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dead-code-eliminator
Source: https://github.com/rainoftime/pl-skills/tree/main/dead-code-eliminator
Command: npx skills add https://github.com/rainoftime/pl-skills --skill dead-code-eliminator-rainoftime

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires dataflow-analysis-framework, control-flow-analysis, and includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill removes unreachable and unused code from programs, which can significantly reduce program size and improve execution speed.

Core Features & Use Cases

  • Unreachable Code Elimination: Removes code blocks that can never be executed.
  • Dead Variable/Store Elimination: Removes computations and writes to variables that are never read.
  • Dead Function Elimination: Removes entire functions that are never called.
  • Use Case: When optimizing a compiler, this skill can be applied as a pass to clean up intermediate code, making the final executable smaller and faster.

Quick Start

Apply the dead-code-eliminator skill to optimize the provided C++ code.

Frequently Asked Questions about dead-code-eliminator

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

FAQPage Schema
How does dead code elimination reduce binary size and improve performance?

Dead code elimination reduces binary size and improves performance by removing unreachable code blocks, unused variables, and uncalled functions. This compiler optimization pass cleans up intermediate code, making the final executable smaller and faster.

How do I eliminate unreachable code and dead variables in a compiler optimization pass?

To eliminate unreachable code and dead variables in a compiler optimization pass, apply a dead code elimination skill to the intermediate code. It identifies live variables and critical instructions using dataflow and control flow analysis to remove unused computations.

Do I need dataflow and control flow analysis to perform dead code elimination?

Yes, you need dataflow analysis and control flow analysis to perform dead code elimination effectively. These analyses identify live variables and critical instructions, which are required to accurately determine which code segments and stores are truly unreachable or unused.

When should I use dead code elimination for code minification and post-inlining cleanup?

You should use dead code elimination for code minification during distribution and for post-inlining cleanup scenarios. It is applicable in compiler optimization passes to remove unreachable code segments and dead functions, significantly shrinking the final program size.