Search papers, labs, and topics across Lattice.
This paper explores a portable inlining-prediction framework designed to replace existing industrial heuristics in compiler optimizations, particularly for lightweight systems lacking robust compiler infrastructure. By leveraging production compiler diagnostics and a dataset of over 336,000 callsites from open-source C projects, the authors train models that predict function inlining decisions without the need for complex runtime dependencies. The framework achieves impressive performance metrics, with CatBoost reaching a ROC-AUC of 0.928 and an F1 score improvement from 0.670 to 0.729 after threshold tuning, highlighting the effectiveness of the proposed method in optimizing compiler operations in constrained environments.
A portable inlining predictor can achieve near-state-of-the-art performance in compiler optimizations without relying on heavyweight infrastructure.
The paper investigates the possibility of predicting function-inlining decisions in compact compilers, source-to-source tools, and interpreters where the reuse of GCC or LLVM optimization infrastructure is impractical. The relevance of this work is determined by the need to transfer mature inlining heuristics to systems with limited compiler infrastructure, restricted runtime dependencies, and reduced access to target-specific analysis. Existing production compilers already contain strong inliners, but their decisions depend on internal intermediate representations (IRs), pass ordering, target models, and analysis stacks that are difficult to reproduce in lightweight systems. To overcome these constraints, we propose a portable inlining-prediction framework. Production compiler diagnostics serve as supervision; a separate extractor reconstructs caller-callee callsites, prepares sterile source snippets, normalizes them into a universal AST, optionally lowers them to a lightweight structural IR, and exports scalar features for model training. Thus, a trained predictor can be emitted as ordinary C code without a compiler-runtime dependency. To evaluate the proposed framework, we constructed a dataset comprising 336,938 callsites from fifteen open-source C projects, including 79,287 compiler-reported inline events. A comparison of several tabular models is performed using project-aware validation. Under leave-one-project-out validation, CatBoost reaches ROC-AUC 0.928 and PR-AUC 0.713; after threshold tuning, F1 improves from 0.670 to 0.729 and the false-positive rate drops from 0.192 to 0.084. Feature analysis shows that most signal is concentrated in source locality, explicit inline intent, callee size, side effects, branch and call structure, signature shape, and callsite argument shape.