paper-with-me

홈 › Papers

Towards LLM-based optimization compilers. Can LLMs learn how to apply a single peephole optimization? Reasoning is all LLMs need!

2024-12-11 · Xiangxin Fang, Lev Mukhanov

Large Language Models (LLMs) have demonstrated great potential in various language processing tasks, and recent studies have explored their application in compiler optimizations. However, all these studies focus on the conventional open-source LLMs, such as Llama2, which lack enhanced reasoning mechanisms. In this study, we investigate the errors produced by the fine-tuned 7B-parameter Llama2 model as it attempts to learn and apply a simple peephole optimization for the AArch64 assembly code. We provide an analysis of the errors produced by the LLM and compare it with state-of-the-art OpenAI models which implement advanced reasoning logic, including GPT-4o and GPT-o1 (preview). We demonstrate that OpenAI GPT-o1, despite not being fine-tuned, outperforms the fine-tuned Llama2 and GPT-4o. Our findings indicate that this advantage is largely due to the chain-of-thought reasoning implemented in GPT-o1. We hope our work will inspire further research on using LLMs with enhanced reasoning mechanisms and chain-of-thought for code generation and optimization.

📄 PDF Abstract BibTeX arXiv:2412.12163

Code (0)

등록된 구현이 없습니다.

Tasks

AllCode Generation

Methods 이 논문이 사용한 방법론

Focus 설명 없음

Similar Papers 제목 키워드 기반

Finding Missed Code Size Optimizations in Compilers using LLMs

2024-12-31 · Davide Italiano, Chris Cummins

Compilers are complex, and significant effort has been expended on testing them. Techniques such as random program generation and differential testing have proved highly effective and have uncovered thousands of bugs in …

WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Models

2023-10-24 · Chenyuan Yang, Yinlin Deng, Runyu Lu, Jiayi Yao 외

Compiler correctness is crucial, as miscompilation can falsify program behaviors, leading to serious consequences. Fuzzing has been studied to uncover compiler defects. However, compiler fuzzing remains challenging: Exis…

Code GenerationCompiler Optimization

Should AI Optimize Your Code? A Comparative Study of Classical Optimizing Compilers Versus Current Large Language Models

2024-06-17 · Miguel Romero Rosas, Miguel Torres Sanchez, Rudolf Eigenmann

Traditional optimizing compilers have played an important role in adapting to the growing complexity of modern software systems. The need for efficient parallel programming in current architectures requires strong optimi…

LLM-Vectorizer: LLM-based Verified Loop Vectorizer

2024-06-07 · Jubi Taneja, Avery Laird, Cong Yan, Madan Musuvathi 외

Vectorization is a powerful optimization technique that significantly boosts the performance of high performance computing applications operating on large data arrays. Despite decades of research on auto-vectorization, c…

LOOPRAG: Enhancing Loop Transformation Optimization with Retrieval-Augmented Large Language Models

2025-12-12 · Yijie Zhi, Yayu Cao, Jianhua Dai, Xiaoyang Han 외 arxiv

Loop transformations are semantics-preserving optimization techniques, widely used to maximize objectives such as parallelism. Despite decades of research, applying the optimal composition of loop transformations remains…

Code Generation