Skip to content

Portable models as a replacement for industrial heuristics in compiler optimizations

Jul 2026 · arXiv.org · Vol abs/2607.17389 · 0 citations · 15 references
Computer Science

TL;DR

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 and proposes a portable inlining-prediction framework that can be emitted as ordinary C code without a compiler-runtime dependency.

Abstract

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.

View source

Similar papers

Jul 2026

Compiler-Grounded Hierarchical Diagnosis for LLM-Based Triton Kernel Optimization

This work forms kernel optimization as a progressive cross-layer diagnosis problem that links runtime symptoms to IR structure and compiler behavior before rewriting source, and presents a compiler-grounded and hierarchical optimization framework for Triton kernels.

Dongjie Chen, Ping Zhao, Bohua Zhan et al. · 0 citations
Jul 2026

Generative Compilation: On-the-Fly Compiler Feedback as AI Generates Code

It is shown that generative compilation reduces non-compiling outputs and improves functional correctness, relative to standard post-generation feedback, by detecting a broad range of errors close to their source and early during generation, thereby reducing errors cascades and enabling focused diagnostics.

Niels Mündler-Sasahara, Hristo Venev, Dawn Song et al. · 0 citations
Book Open access Jul 2026

Cross-Architecture Autotuning for Single-Source Heterogeneous Programming Models

An automated framework is introduced that jointly explores compiler flags and runtime parameters using both Bayesian optimization and a tabu-search–based strategy to investigate the transferability of compile-time and runtime autotuning decisions across CPUs and GPUs, focusing on AdaptiveCpp, a SYCL implementation buil...

Hari Abram, Nikela Papadopoulou, Jens Domke et al. · 0 citations
Preprint Aug 2026

Effect of Abstractions and Prompting Strategies on LLM-Guided High-Performance Optimizations

It is demonstrated that LLMs provided with specific optimization goals achieve better measured performance and validity rates when generating C code compared to creating computation pipelines and optimization schedules with established frameworks, suggesting that future development should explore alternative approaches...

Jiří Klepl, Matyáš Brabec, Martin Kruliš · 0 citations
Preprint Jul 2026

An MLIR-Based Compilation Method for Large Language Models

An MLIR (Multi-Level Intermediate Representation) based compilation method for large language models, illustrated using two dialects of operators, TopOp and TpuOp, supporting a variety of generative models including the Qwen, Llama, InternVL, and MiniCPM-V series.

Pengchao Hu, Zhibin Xin, Yifan Chen et al. · 0 citations
Conference 2026

Characterizing Type Feedback in Just-In-Time Compilation

A characterization study of how feedback information is utilized by JIT compilers, providing motivation for future work on reducing recording overhead, and evaluating two oracle-based configurations that establish upper bounds on achievable reduction.

Sebastián Krynski, F. Říha, Filip Křikava et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.