Score
Designs and implements compiler optimizations for ML compilers (e.g., XLA), producing optimization passes, code generation strategies, and performance-tuned compiler components.
Traditional compilers face limitations in development accessibility, optimization capabilities, and application scope. This work proposes the first multidimensional classification framework for large language model (LLM)-driven compilation, offering a systematic survey of existing research through four analytical dimensions: design philosophy, methodology, level of code abstraction, and task type. The study identifies three core design paradigms—Selector, Translator, and Generator—and highlights three transformative directions: democratizing compiler development, discovering novel optimization strategies, and expanding functional boundaries. It further argues that hybrid systems represent a critical pathway forward and provides a technical roadmap for building correct, scalable, and intelligent compilation tools.
This work systematically evaluates the potential of large language models (LLMs) for automatic code optimization in high-performance computing (HPC), where traditional approaches often struggle to balance performance and correctness. The study introduces a novel methodology that leverages multi-level abstractions and goal-oriented prompting to guide LLMs in directly generating optimized C code. Evaluated on the PolyBench benchmark suite, this approach is compared against conventional auto-tuning frameworks that rely on schedule representations. Experimental results demonstrate that LLM-generated C code achieves superior performance and effectiveness, highlighting the critical influence of compiler optimization abstractions on LLM guidance. These findings establish a promising new direction toward verifiable, LLM-driven code optimization for HPC applications.
Traditional compilers struggle to exploit optimization opportunities that require high-level semantic understanding, while large language models (LLMs), despite their generative capabilities, often introduce correctness errors. This work proposes a collaborative multi-agent optimization framework that integrates compiler-driven analysis with LLM-based code generation across multiple abstraction levels, complemented by automated test validation and dynamic resource scheduling. By rigorously enforcing correctness through verification mechanisms, the approach achieves consistent performance gains without compromising reliability. Evaluated on multiple benchmarks, the method significantly outperforms both conventional compilers and single-stage LLM-based optimization strategies, delivering up to a 1.25× speedup.
Automated optimization of complex nested loops on modern hardware remains challenging due to the combinatorial complexity of legal and profitable loop transformations. Method: This paper proposes an LLM-guided closed-loop compilation optimization framework that leverages a general-purpose large language model—without fine-tuning or in-context examples—as an intelligent agent. Grounded in the polyhedral model, the LLM generates loop transformation schedules, which are iteratively refined using real-time compiler feedback on both performance speedup and semantic correctness. Contribution/Results: To our knowledge, this is the first zero-shot, feedback-driven autonomous scheduling approach, introducing the embodied intelligence paradigm into compiler optimization. Evaluated on the PolyBench benchmark, it achieves an average 2.66× speedup per run and up to 3.54× after five iterations—substantially outperforming state-of-the-art tools such as Pluto—demonstrating the feasibility and superiority of LLM–compiler co-optimization for efficient, reliable automatic loop optimization.
Current compiler optimization testing heavily relies on multi-compiler differential testing, which is constrained by functional consistency requirements and incapable of detecting shared bugs or unimplemented features—leading to false positives and high manual verification overhead. To address this, we propose a single-compiler metamorphic testing approach driven by optimization rules: it formally models optimization preconditions, synthesizes input programs satisfying those conditions, injects semantics-preserving equivalent transformations, and automatically detects incorrect optimizations by comparing program outputs before and after transformation. This method breaks from the differential testing paradigm and introduces the first endogenous testing framework—“optimization-guided generation, equivalence-based mutation, output-driven validation”—integrated directly into GCC and LLVM’s low-level optimization pipelines. Evaluated on real-world scenarios, it uncovered five previously unreported optimization bugs, significantly enhancing the reliability assurance of compiler optimization implementations.
This work addresses the limitations of traditional compilers, which rely on hand-crafted optimization heuristics that struggle to adapt to the growing complexity of modern software and hardware and incur high maintenance costs. The authors propose an intelligent agent framework that integrates large language models, evolutionary search, and automated tuning to form a closed-loop pipeline of generation, evaluation, and optimization. For the first time, this approach enables end-to-end synthesis of compact, executable C++ code embodying optimization decision logic without human intervention. Evaluated on LLVM’s function inlining and register allocation tasks, the automatically generated policies match or outperform expert-designed rules in both code size and performance. The study also provides preliminary evidence of the framework’s transferability to XLA.
This paper investigates the trade-off between search efficiency and optimization effectiveness in automated code optimization, specifically addressing whether fixed-order application of code transformations can substantially reduce the search space without significantly compromising performance gains. To this end, we propose a data-driven empirical methodology: generating random programs, executing randomized optimization sequences, measuring runtime performance, and constructing a large-scale experimental dataset to statistically characterize inter-transform interactions. Our results demonstrate that several high-performance fixed optimization sequences exist—achieving over 95% of the optimal performance gain while reducing the search space by more than 90% on average. This finding provides empirically validated theoretical support and practical design principles for compiler auto-optimization strategies.
Compiler optimization fuzzing faces two key bottlenecks: (1) fixed optimization sequences fail to capture inter-stage interactions, and (2) syntactically sensitive trigger conditions are rarely generated via conventional mutation. This paper proposes a syntax-guided directed fuzzing method for compiler optimizations, introducing the novel concept of “compositional style”—leveraging structural program relationships (e.g., nesting, adjacency) to guide mutations and precisely activate optimization logic missed by traditional pipelines. Our approach employs syntax-driven automatic operator synthesis and crossover strategies, enabling rapid adaptation to new languages and modular IRs such as MLIR. Evaluations on LLVM and MLIR demonstrate a 2.6–2.8× increase in optimization trigger count, an 8–11% improvement in code coverage, and the discovery of 12 previously undetected LLVM optimization bugs—each missed by standard optimization pipelines.
This work addresses the limitations of existing code optimization techniques, which struggle to effectively handle dynamic languages and are often confined to single-level transformations, thereby failing to precisely identify performance bottlenecks. To overcome these challenges, we propose Optimo—a multi-level, pattern-aware code optimization framework powered by a Mixture-of-Prompts (MoP) architecture that, for the first time, integrates the mixture-of-experts paradigm into code optimization. Optimo employs differential profiling to pinpoint critical code structures and performs coordinated optimizations across four abstraction levels—from algorithms down to APIs. Experimental results demonstrate that Optimo achieves up to a 57.48% optimization success rate with a 3.97× speedup on human-written code, and a 42.42% success rate with a 13.51× speedup on LLM-generated code, significantly outperforming current baselines on the COFFE and Effibench benchmarks.
Handcrafted generalization of peephole optimization rules is costly and error-prone, while existing automated approaches suffer from limited generalizability. This work proposes LPG, a novel framework that integrates large language models with formal verification to automatically synthesize correct and efficient optimization rules within a closed-loop pipeline. By leveraging semantic abstraction, symbolic constants, structural generalization, constraint relaxation, and bit-width/precision generalization, LPG achieves robust rule generalization. Evaluated on real-world LLVM cases, LPG successfully generalizes 90 out of 102 rules and substantially outperforms Hydra on an integer subset (74 vs. 35), demonstrating superior capabilities in generalization, correctness, and performance gains.
This work addresses the subtle microarchitectural performance inefficiencies often introduced by modern compiler optimizations, which can lead to significant yet overlooked performance losses. The authors propose a top-down differential analysis methodology that systematically identifies and categorizes the root causes of such optimization defects by integrating fine-grained microarchitectural performance counter sampling with cross-compiler (GCC/Clang) binary comparisons. Innovatively combining top-down microarchitectural analysis with differential testing, the approach further introduces a portable binary patching framework to precisely locate and rectify inefficient code segments. Empirical evaluation demonstrates that the method effectively uncovers substantial but commonly neglected performance discrepancies between GCC and Clang and successfully recovers performance through targeted binary patches.