Score
The LLVM compiler infrastructure: a modular system for compiling and optimizing code using its intermediate representation (IR), implementing frontends/backends, transformations and code generation, and tools like clang, llc, and llvm-opt for building custom compilers and codegen pipelines.
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 addresses the interoperability challenge between GCC and LLVM compiler intermediate representations (IRs), which stems from their semantic and structural differences. To bridge this gap, the authors propose IRIS-14B, the first large language model specifically designed for IR-to-IR translation. Built upon a 14-billion-parameter Transformer architecture, IRIS-14B leverages supervised fine-tuning to learn the mapping between GIMPLE and LLVM IR derived from the same C source code, enabling high-fidelity automatic translation. Experimental results demonstrate that IRIS-14B substantially outperforms existing open-source large models on real-world C programs and competitive programming tasks, achieving up to a 44-percentage-point improvement in accuracy. This study provides the first empirical validation of large language models as effective and feasible interoperability layers within neuro-symbolic hybrid compilation frameworks.
This work addresses the significant challenge of repairing bugs in the complex LLVM compiler infrastructure, where the effectiveness of large language models (LLMs) remains unclear. To advance research in this domain, the authors introduce LLVM-Bench, a large-scale benchmark for LLVM repair, and LLVM-Gym, an automated evaluation platform. They further propose LLVM-Ens, a lightweight ensemble approach that integrates patches generated by multiple LLMs and filters out invalid candidates. Experimental results demonstrate that LLVM-Ens achieves a 21.99% problem-solving rate on LLVM-Bench, substantially outperforming any single model. The study also identifies patch invalidity and build failures as the predominant failure modes, thereby validating the efficacy of integrating complementary techniques in automated program repair for complex compiler systems.
This work investigates the feasibility of the “Large Language Model as a Compiler” (LaaC) paradigm—i.e., whether LLMs can perform end-to-end, precise compilation from source code to target assembly. To this end, the authors introduce CompilerEval†, the first benchmark dataset specifically designed for compilation tasks, comprising multilingual source code paired with cross-platform (x86, ARM, RISC-V) assembly. They develop a dedicated evaluation framework and employ prompt engineering, chain-of-thought reasoning, and model scaling to systematically assess the source-code understanding and assembly-generation capabilities of leading open- and closed-source LLMs. Results show that current LLMs possess foundational compilation ability; targeted optimizations substantially improve assembly correctness and overall compilation success rates. This study provides the first systematic empirical validation of LaaC’s technical viability, proposes principled architectural guidelines and evolutionary pathways for compilation-oriented LLMs, and establishes a foundation for AI-native compiler research.
To address trust bottlenecks in large language models (LLMs) for code generation—including hallucination, difficulty in correctness verification, and lack of result interpretability—this paper proposes a generative-discriminative dual-model framework. A generative LLM automatically constructs compiler test cases for instruction-level parallel programming, while a discriminative LLM performs end-to-end verification by integrating formal constraints and logical reasoning. Key innovations include multi-scale model orchestration (7B–70B parameters), structured prompt engineering, automated feedback loops, and a ten-dimensional evaluation metric suite covering functional correctness, boundary robustness, and error detection rate. Experiments demonstrate substantial improvements in test-case quality and generation reliability, outperforming baselines in coverage and defect identification. The framework establishes a novel, interpretable, and formally verifiable paradigm for trustworthy LLM-driven code generation.
To address the challenge of insufficient end-to-end fuzzing coverage for the LLVM compiler backend, this paper introduces IRFuzzer—the first dedicated fuzzing framework targeting LLVM’s backend. Methodologically, it employs constraint-guided mutation coupled with LLVM IR syntax awareness to generate well-structured inputs supporting complex control flow, vector types, and function definitions. Furthermore, it instruments critical paths in the instruction selector and introduces a fine-grained feedback mechanism that jointly leverages matcher table coverage and architecture-specific built-in function invocation. Evaluated across 29 mainstream backends, IRFuzzer discovered 78 previously unknown defects—undetected by all existing fuzzers—leading to 57 fixes merged into LLVM’s main branch and 5 backported to LLVM 15. This work significantly advances the reliability verification of LLVM backend code generation.
Modern compilers (e.g., LLVM, GCC) struggle to fully exploit SIMD parallelism (e.g., AVX, RVV) due to complex control-flow analysis, limited IR expressiveness, and fragmented vectorization pipelines. This work proposes a scalable vectorization framework: first, it extends LLVM IR with two novel representations—Structured IR (SIR) to explicitly encode control-flow structures, and Vector IR (VIR) to precisely model data dependencies; second, it integrates CFG reconstruction, fine-grained dependency analysis, and cross-IR pattern matching to improve both the accuracy of vectorization opportunity detection and the completeness of the search space. Experimental evaluation on standard benchmarks demonstrates performance improvements of up to 53% over LLVM and 58% over GCC, while significantly enhancing vectorization coverage and end-to-end compilation efficiency.
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.
Abstract transformers in compiler static analysis often struggle to simultaneously ensure correctness, precision, and efficiency. Method: This paper introduces the first fully automated synthesis framework for integer abstract domains in MLIR—requiring no human-provided sketches. It decomposes complex transformer synthesis into constructing intersections of elementary transformers and achieves end-to-end automation via progressive precision refinement. The approach employs a non-relational abstraction model and reduces verification to an SMT-decidable fragment for formal, sound validation of all synthesized transformers. Contribution/Results: Experiments show that the synthesized transformers cover numerous LLVM instructions long missing from existing static analyzers; 17% surpass the precision of current LLVM implementations. This significantly improves both the reliability of static analysis and the breadth of IR coverage.
This work addresses the challenge of efficiently balancing accuracy and latency in structured large language model (LLM) workflows, where the combinatorial design space—spanning model selection, inference budgets, and pipeline architecture—is prohibitively vast. To tackle this, the study introduces, for the first time, machine learning compilation principles into LLM workflow optimization. It performs global design space exploration prior to deployment by leveraging sub-agent decomposition, multi-configuration performance profiling, and a structure-aware surrogate model to accurately estimate and jointly optimize workflow-level accuracy and latency. The proposed approach generates a reusable set of Pareto-optimal configurations that span diverse accuracy–latency trade-offs, without requiring online adaptation or retraining. Experiments across multiple complex workflows and benchmarks demonstrate substantial improvements over heuristic and routing baselines, achieving up to 6.4× speedup while enabling flexible deployment and downstream scheduling.
This work addresses two key challenges in compiler education: low reusability of intermediate language (IL) testing frameworks and the difficulty of reconciling high-level safety abstractions with low-level assembly features. We propose a family-of-intermediate-languages design methodology based on Racket macro embedding. Leveraging local macro expansion, we uniformly embed a series of ILs—from Scheme-like source languages to x86-64 target code—into Racket, enabling semantic-level interoperability between higher-order functional abstractions and unsafe assembly primitives. Our approach innovates by supporting open, modular composition of language features: ILs can be dynamically assembled without modifying the host language. The resulting interpreter exposes multiple interfaces, significantly simplifying semantic specification and test development. Evaluated in university compiler courses, our framework has improved IL reuse and pedagogical scalability.