Inlining's Top 3 Distortions for AI Code Features

Function inlining drastically alters static binary features essential for AI code analysis, specifically impacting control-flow graphs, instruction sequences, and function boundaries, rendering AI tasks like vulnerability detection highly sensitive to its application.

The top 3

  1. Control Flow Graph Alterations: Function inlining merges a callee's instructions directly into the caller, fundamentally altering the control flow graph and removing explicit function call boundaries, making it difficult for AI to reconstruct original function structures and inter-procedural relationships.
  2. Static Feature Unreliability for ML: Inlining drastically changes static features like machine instructions and control flow graphs, which are critical inputs for machine learning models in binary analysis, making these features unreliable for AI's decision-making, especially under aggressive inlining.
  3. Increased Code Size & Modularity Loss: Overuse of inlining can lead to significant code bloat, increasing binary size and potentially reducing instruction cache locality. This diminishes code modularity and abstraction, making the overall codebase harder for AI to process and understand due to higher complexity.

Sources

Open the full topic