inline-expander

Inline C++ function calls with parameter substitution and heuristic decisions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ssa-constructor, dead-code-eliminator, and includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill addresses the performance overhead associated with function calls by replacing them with the actual code of the called function, leading to faster execution and enabling further compiler optimizations.

Core Features & Use Cases

  • Call Site Inlining: Replaces function calls with the callee's body.
  • Parameter Substitution: Manages the substitution of function arguments.
  • Heuristic Decision Making: Selects appropriate functions for inlining to balance performance gains against code size.
  • Use Case: When building an optimizing compiler, use this skill to eliminate the overhead of small, frequently called helper functions, thereby improving overall program speed.

Quick Start

Apply function inlining to the provided C++ code to optimize performance.

Frequently Asked Questions about inline-expander

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

FAQPage Schema
How does function inlining optimize compiler performance?

Function inlining optimizes performance by replacing function calls with the callee's actual code, eliminating call overhead and enabling further interprocedural optimizations within the compiler framework.

What is the best way to handle parameter substitution when expanding functions?

Parameter substitution during function inlining is handled by directly managing the replacement of function arguments within the call site, ensuring correct variable mapping for the expanded code body.

How do compilers decide which functions to inline to balance code size and speed?

Compilers apply heuristic decision-making to select appropriate functions for inlining, balancing execution performance gains against potential increases in compiled code size for recursive and non-recursive calls.

Do I need an SSA constructor to use function inlining?

Function inlining requires an SSA constructor dependency to properly manage variable mappings and control flow during call site expansion and parameter substitution.

When should I avoid function inlining in an optimizing compiler?

You should avoid function inlining when code size expansion is a critical constraint, as replacing calls with full function bodies can significantly increase the compiled binary footprint.

What tools work with function inlining to remove unused expanded code?

A dead-code eliminator works with function inlining by removing unreachable or unused instructions generated after parameter substitution and call site expansion, finalizing the optimization.