Skip to content
Preprint

Effect of Abstractions and Prompting Strategies on LLM-Guided High-Performance Optimizations

Aug 2026 · 0 citations · 21 references
Computer Science

TL;DR

It is demonstrated that LLMs provided with specific optimization goals achieve better measured performance and validity rates when generating C code compared to creating computation pipelines and optimization schedules with established frameworks, suggesting that future development should explore alternative approaches for verifiable LLM-guided code optimization.

Abstract

Code performance optimization is a vital aspect of modern software development, as it enables faster response times and reduced resource usage. These optimizations require a deep understanding of low-level hardware details and the intricacies of parallel processing, making them challenging even for experienced developers. With the advent of Large Language Models (LLMs), which are increasingly capable of generating and understanding code, there is growing interest in incorporating these models into automated code optimization processes. Traditionally, this automation involves transcribing the source code into a domain-specific representation that can be auto-tuned using grid search or machine learning algorithms, while adhering to strict rules and a limited set of feasible transformations to ensure verifiability. LLMs incorporate high-level code semantics and can thus perform transformations that go beyond verifiable automated optimizations. This paper investigates whether the traditional abstractions used in automated code optimization improve the performance and correctness of LLM-guided optimizations of parallel HPC applications. We evaluate this using the PolyBench benchmark suite and demonstrate that, in our evaluated setting, LLMs provided with specific optimization goals achieve better measured performance and validity rates when generating C code compared to creating computation pipelines and optimization schedules with established frameworks, suggesting that future development should explore alternative approaches for verifiable LLM-guided code optimization.

View source

Similar papers

Preprint Aug 2026

T-LLM Compiler: Trusted LLM-based Code Optimization and Verification Framework

The Trusted LLM (T-LLM) Compiler is presented, which proposes an advancement in compiler technology through a collaborative effort involving high-level LLM code transformations, traditional compilers, and verification tools and facilitates iterative code optimization efforts with verification strategies that enable cor...

Zahra Fazel, Sunanda Gamage, Shayan Shirahmad Gale Bagi et al. · 0 citations
Jul 2026

Multi-level Code Optimization via Mixture of Prompts

Optimo is proposed, a multi-level LLM-based code optimization approach built on a novel Mixture-of-Prompts (MoP) architecture that achieves up to 57.48% opt%, and consistently outperforms the best baseline by up to 96.51% in terms of opt%.

Yun Peng, Jun Wan, Jiakun Liu et al. · 0 citations
Open access Jul 2026

LLMSGHD: Co-Designing Large Language Model Software and Hardware for Efficient Inference

A hardware evaluation platform called LLMSGHD (Large Language Model Software-Guided Hardware Design), which focuses on operator-level optimized LLM inference workloads and integrates advanced software optimization techniques to offer more insightful analysis for hardware design.

Qing-Shan Xue, Sheng Ma, Rui Xu et al. · 0 citations
Open access Jul 2026

Context-Aware Inlining: Using Call-Stack Profiles for Fast and Smaller Binaries

This article presents a novel technique for reducing the size of AOT compiled programs by using fully-context-sensitive profiles to concentrate the optimizations on the hot code.

Maja Vukasović, Petar Đekanović, B. Spasojević et al. · 0 citations
Book Open access Jul 2026

Cross-Architecture Autotuning for Single-Source Heterogeneous Programming Models

An automated framework is introduced that jointly explores compiler flags and runtime parameters using both Bayesian optimization and a tabu-search–based strategy to investigate the transferability of compile-time and runtime autotuning decisions across CPUs and GPUs, focusing on AdaptiveCpp, a SYCL implementation buil...

Hari Abram, Nikela Papadopoulou, Jens Domke et al. · 0 citations
Preprint Aug 2026

Accelerating C/C++ Pointer Analysis via Compiler-Based Offline Simplifications

This paper explores a new perspective: applying semantic-preserving compiler optimizations directly to intermediate representation (IR) before pointer analysis, which is modular, analysis-agnostic, and easily integrates with existing tools.

Zi-Nan Gu, Pei-Sen Yao, Kui Ren · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.