pith. sign in

arxiv: 2309.07062 · v1 · pith:LH46NL4Rnew · submitted 2023-09-11 · 💻 cs.PL · cs.AI· cs.CL· cs.LG

Large Language Models for Compiler Optimization

classification 💻 cs.PL cs.AIcs.CLcs.LG
keywords modelcodecompileroptimizationlargeassemblycountsimprove
0
0 comments X
read the original abstract

We explore the novel application of Large Language Models to code optimization. We present a 7B-parameter transformer model trained from scratch to optimize LLVM assembly for code size. The model takes as input unoptimized assembly and outputs a list of compiler options to best optimize the program. Crucially, during training, we ask the model to predict the instruction counts before and after optimization, and the optimized code itself. These auxiliary learning tasks significantly improve the optimization performance of the model and improve the model's depth of understanding. We evaluate on a large suite of test programs. Our approach achieves a 3.0% improvement in reducing instruction counts over the compiler, outperforming two state-of-the-art baselines that require thousands of compilations. Furthermore, the model shows surprisingly strong code reasoning abilities, generating compilable code 91% of the time and perfectly emulating the output of the compiler 70% of the time.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 8 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. LLM Translation of Compiler Intermediate Representation

    cs.PL 2026-05 unverdicted novelty 8.0

    IRIS-14B is the first LLM trained explicitly for GIMPLE-to-LLVM IR translation and outperforms much larger models by up to 44 percentage points on real-world C code.

  2. Source-Free Detection and Impact Analysis of Compiler Optimization Problems in Mobile Applications

    cs.SE 2026-06 unverdicted novelty 7.0

    OptDetect identifies low-optimization native libraries in Android apps with 81.9% real-world accuracy, finding the issue in 30.5% of libraries across 91.7% of top apps, with fixes yielding 10-63% CPU reduction.

  3. TensorBench: Benchmarking Coding Agents on a Compiler-Based Tensor Framework

    cs.CL 2026-06 unverdicted novelty 7.0

    TensorBench is a new benchmark of 199 tasks on a tensor framework used to evaluate seven coding agents, yielding pass rates from 22.1% to 64.8% with low inter-agent agreement.

  4. Step-TP: A Grounded, Step-Level Dataset with Chain-of-Thought Reasoning for LLM-Guided Tensor Program Optimization

    cs.LG 2026-05 unverdicted novelty 7.0

    Step-TP is a dataset providing grounded, atomic step-level IR transitions and CoT supervision to enable reliable multi-step LLM-guided tensor program optimization instead of end-to-end imitation.

  5. JETO-Bench: A Reproducible Benchmark for Execution Time Improvement Patches in Java

    cs.SE 2026-06 conditional novelty 6.0

    JETO-Mine is a reusable three-phase pipeline that mines 1.8 million Java commits to produce JETO-Bench containing 91 verified executable ETIPs, on which OpenHands succeeds at 14.3%.

  6. AgentCompile: An LLM-Guided Compiler for Direct CUDA Inference

    cs.PL 2026-06 unverdicted novelty 6.0

    AgentCompile is an LLM-guided CUDA compiler that reports 4-5.7x speedups over PyTorch eager for small transformer models by treating LLM suggestions as search metadata while relying on compiler validation and measured...

  7. InCoder-32B-Thinking: Industrial Code World Model for Thinking

    cs.AR 2026-04 unverdicted novelty 6.0

    InCoder-32B-Thinking uses error-feedback synthesized thinking traces and a code world model to reach top open-source scores on general and industrial code benchmarks including 81.3% on LiveCodeBench and 84.0% on CAD-Coder.

  8. Modeling Pathology-Like Behavioral Patterns in Language Models Through Behavioral Fine-Tuning

    cs.CL 2026-05 unverdicted novelty 5.0

    Fine-tuning LLMs on structured tasks inspired by maladaptive behaviors produces stable, context-general shifts in next-token distributions and response tendencies consistent with altered behavioral priors.