potentialpaper

PROFILE2PATCH: COMPILER-FEEDBACK-GUIDED LLM SOURCE CODE OPTIMISATION BEYOND PGO

Anonymous authors

ICLR 2027

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

TL;DR. Profile2Patch uses compiler and runtime profiling evidence to guide LLM-generated source transformations that improve application performance beyond PGO while preserving correctness.

Abstract. Profile-guided optimisation (PGO) improves programs by exploiting observed execution behaviour through compiler-controlled decisions such as branching weighting, inlining and code layout, but it cannot generally invent semantic source-level restructuring. Large language models (LLMs) can propose such transformations, yet without execution evidence they may target non-critical code or select transformations whose performance impact is unclear. Our key observation is that compiler and runtime profiles can serve not only as inputs to compiler optimization, but also as actionable evidence for guiding LLMs toward source-level transformations that address bottlenecks beyond PGO. Based on this observation, we propose Profile2Patch, a framework that localizes runtime hotspots, combines the relevant source context with progressively richer profiling evidence, and uses an LLM to generate targeted source transformation. Candidate transformations are subjected to correctness validation before performance evaluation, and the accepted implementations are compared against both the original -O3 code and PGO. We evaluate our approach on 48 benchmark across eight application groups, including GROMACS, LAMMPS, FFmpeg, SQLite, cBench, KGraph, Quant, and GEMM, using GCC 16.1 and Clang 22.1. Across the application groups, the best Profile2Patch configurations consistently outperform PGO, with speedups over the original implementation reaching 19.74× for GEMM, 5.30×, 5.85× for SQLite, and 1.88×, 2.46× for KGraph under GCC and Clang, respectively. The largest improvements occur where profiling exposes concentrated source-level bottlenecks amenable to structural transformation, whereas already highly optimised or diffuse workloads such as GROMACS provide comparatively limited optimization.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
14 Sep 2026ICLR 2027submittedICLR 2027Desk rejectedreviews ↓[1]PDF[1]
Missing a version?

ICLR 2027

Desk rejected · OpenReview

Updated 24 Nov 2026, 16:52 UTC.

The venue hasn't published any reviews yet.

Missing a submission?

Loading the discussion…