SearcharxivSearch

arXiv subjects

Jinyuan Dong

Publications and source records attributed to Jinyuan Dong.

4 recordsLinked to original sources

GRACE: Cluster-Specific Sequence Reuse for Compiler Auto-Tuning

Compiler auto-tuning aims to improve optimization quality beyond fixed compiler heuristics, but existing approaches often face a trade-off between effectiveness and deployability. Iterative compilation can discover strong program-specific optimization sequences, yet its search cost is often prohibitive for practical reuse. Learning-based methods reduce tuning overhead, but their effectiveness depends on how well optimization knowledge transfers to unseen programs. Recent coreset-based methods improve this trade-off, but they typically either still rely on relatively large test-time search or assume that a single global coreset can serve all programs well. We present GRACE, a compiler auto-tuning framework based on \emph{cluster-specific sequence reuse}. GRACE constructs a small reusable sequence coreset for each group of similar programs by combining global pass synergy analysis, optimization-response-guided program organization, and cluster-specific evolutionary search. At deployment time, it evaluates a small coreset on the target program and optionally performs lightweight refinement within a restricted search space, yielding bounded overhead. We evaluate GRACE on seven benchmark datasets using LLVM 10.0.0 and LLVM 18.1.6. For code-size optimization, GRACE reduces LLVM IR instruction count by 9.92\% and 10.30\% on average relative to \texttt{opt -Oz}, while requiring less than 1\,s tuning time per program at deployment. Under an execution-oriented objective, GRACE reduces estimated cycle counts by 26.84\% and 27.54\% on average relative to \texttt{opt -O3}, and also yields measurable end-to-end speedups on runnable cBench and polybench programs. These results suggest that offline-constructed, cluster-specific sequence coresets provide a practical balance between optimization quality and cost.

cs.SE

ECCO: Evidence-Driven Causal Reasoning for Compiler Optimization

Compiler auto-tuning faces a dichotomy between traditional black-box search methods, which lack semantic guidance, and recent Large Language Model (LLM) approaches, which often suffer from superficial pattern matching and causal opacity. In this paper, we introduce ECCO, a framework that bridges interpretable reasoning with combinatorial search. We first propose a reverse engineering methodology to construct a Chain-of-Thought dataset, explicitly mapping static code features to verifiable performance evidence. This enables the model to learn the causal logic governing optimization decisions rather than merely imitating sequences. Leveraging this interpretable prior, we design a collaborative inference mechanism where the LLM functions as a strategist, defining optimization intents that dynamically guide the mutation operations of a genetic algorithm. Experimental results on seven datasets demonstrate that ECCO significantly outperforms the LLVM opt -O3 baseline, achieving an average 24.44% reduction in cycles.

cs.LG

Behavioral Embeddings of Programs: A Quasi-Dynamic Approach for Optimization Prediction

Learning effective numerical representations, or embeddings, of programs is a fundamental prerequisite for applying machine learning to automate and enhance compiler optimization. Prevailing paradigms, however, present a dilemma. Static representations, derived from source code or intermediate representation (IR), are efficient and deterministic but offer limited insight into how a program will behave or evolve under complex code transformations. Conversely, dynamic representations, which rely on runtime profiling, provide profound insights into performance bottlenecks but are often impractical for large-scale tasks due to prohibitive overhead and inherent non-determinism. This paper transcends this trade-off by proposing a novel quasi-dynamic framework for program representation. The core insight is to model a program's optimization sensitivity. We introduce the Program Behavior Spectrum, a new representation generated by probing a program's IR with a diverse set of optimization sequences and quantifying the resulting changes in its static features. To effectively encode this high-dimensional, continuous spectrum, we pioneer a compositional learning approach. Product Quantization is employed to discretize the continuous reaction vectors into structured, compositional sub-words. Subsequently, a multi-task Transformer model, termed PQ-BERT, is pre-trained to learn the deep contextual grammar of these behavioral codes. Comprehensive experiments on two representative compiler optimization tasks -- Best Pass Prediction and -Oz Benefit Prediction -- demonstrate that our method outperforms state-of-the-art static baselines. Our code is publicly available at https://github.com/Panhaolin2001/PREP/.

cs.LG

Synergy-Guided Compiler Auto-Tuning of Nested LLVM Pass Pipelines

Compiler optimization relies on sequences of passes to improve program performance. Selecting and ordering these passes automatically, known as compiler auto-tuning, is challenging due to the large and complex search space. Existing approaches generally assume a linear sequence of passes, a model compatible with legacy compilers but fundamentally misaligned with the hierarchical design of the LLVM New Pass Manager. This misalignment prevents them from guaranteeing the generation of syntactically valid optimization pipelines. In this work, we present a new auto-tuning framework built from the ground up for the New Pass Manager. We introduce a formal grammar to define the space of valid nested pipelines and a forest-based data structure for their native representation. Upon this foundation, we develop a structure-aware Genetic Algorithm whose operators manipulate these forests directly, ensuring that all candidate solutions are valid by construction. The framework first mines synergistic pass relationships to guide the search. An optional refinement stage further explores subtle performance variations arising from different valid structural arrangements. We evaluate our approach on seven benchmark datasets using LLVM 18.1.6. The discovered pipelines achieve an average of 13.62% additional instruction count reduction compared to the standard opt -Oz optimization level, showing that our framework is capable of navigating this complex, constrained search space to identify valid and effective pass pipelines.

cs.SE