original_ir stringlengths 1.1k 9.44M | preprocessed_ir stringlengths 1.05k 8.74M | o3_ir stringlengths 911 3.46M | o3_active_passes stringlengths 32 570 | structural_hash stringlengths 13 16 | repo_name stringclasses 804
values | repo_file_path stringlengths 1 179 | function_name stringlengths 1 86 | repo_license stringclasses 11
values |
|---|---|---|---|---|---|---|---|---|
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%struct.RingBuffer = type { i64, i64, i64, ptr }
; Function Attrs: nounwind uwtable
define dso_local void @ringBufferAppendMultiple(ptr noundef %0, ptr noundef %1, i64 nound... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%STRUCT0 = type { i64, i64, i64, ptr }
; Function Attrs: nounwind uwtable
define dso_local void @ringBufferAppendMultiple(ptr noundef %0, ptr noundef %1, i64 noundef %2) #0 {
... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) uwtable
define dso_local void @ringBufferAppendMultiple(pt... | EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass | 8df68fc909152b98 | Ultrawipf/OpenFFBoard | Firmware/FFBoard/Src | ringbuffer | MIT |
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%struct.RingBuffer = type { i64, i64, i64, ptr }
; Function Attrs: nounwind uwtable
define dso_local void @ringBufferClear(ptr noundef %0) #0 {
%2 = alloca ptr, align 8
... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%STRUCT0 = type { i64, i64, i64, ptr }
; Function Attrs: nounwind uwtable
define dso_local void @ringBufferClear(ptr noundef %0) #0 {
B0:
%1 = alloca ptr, align 8
store ptr %0... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write) uwtable
define dso_local void @ringBufferClear(ptr nocapture noundef writeonl... | EarlyCSEPass,GlobalOptPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass | f146ecfe589fbf23 | Ultrawipf/OpenFFBoard | Firmware/FFBoard/Src | ringbuffer | MIT |
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%struct.RingBuffer = type { i64, i64, i64, ptr }
; Function Attrs: nounwind uwtable
define dso_local i32 @ringBufferInit(ptr noundef %0, ptr noundef %1, i64 noundef %2) #0 {... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%STRUCT0 = type { i64, i64, i64, ptr }
; Function Attrs: nounwind uwtable
define dso_local i32 @ringBufferInit(ptr noundef %0, ptr noundef %1, i64 noundef %2) #0 {
B0:
%3 = al... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @ringBufferInit(ptr nocapture noundef writeonly %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr... | EarlyCSEPass,GlobalOptPass,IPSCCPPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass | 1355967d51224c85 | Ultrawipf/OpenFFBoard | Firmware/FFBoard/Src | ringbuffer | MIT |
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%struct.RingBuffer = type { i64, i64, i64, ptr }
; Function Attrs: nounwind uwtable
define dso_local i64 @ringBufferLen(ptr noundef %0) #0 {
%2 = alloca i64, align 8
%3 ... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%STRUCT0 = type { i64, i64, i64, ptr }
; Function Attrs: nounwind uwtable
define dso_local i64 @ringBufferLen(ptr noundef %0) #0 {
B0:
%1 = alloca i64, align 8
%2 = alloca ptr... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i64 @ringBufferLen(ptr nocapture noundef readonly %0)... | CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass | 14aa1e783965ed4a | Ultrawipf/OpenFFBoard | Firmware/FFBoard/Src | ringbuffer | MIT |
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%struct.RingBuffer = type { i64, i64, i64, ptr }
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%STRUCT0 = type { i64, i64, i64, ptr }
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) uwtable
define dso_local void @ringBufferPeekMultiple(ptr ... | EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass | 83eb244fbc5a9f71 | Ultrawipf/OpenFFBoard | Firmware/FFBoard/Src | ringbuffer | MIT |
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%class.RingBufferWrapper = type <{ ptr, %struct.RingBuffer, i8, [7 x i8] }>
%struct.RingBuffer = type { i64, i64, i64, ptr }
@_ZTV17RingBufferWrapper = external dso_local un... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%STRUCT0 = type <{ ptr, %STRUCT1, i8, [7 x i8] }>
%STRUCT1 = type { i64, i64, i64, ptr }
@_ZTV17RingBufferWrapper = external dso_local unnamed_addr constant { [4 x ptr] }, ali... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@_ZTV17RingBufferWrapper = external dso_local unnamed_addr constant { [4 x ptr] }, align 8
; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN17RingBu... | CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass | 9532890b69e8f419 | Ultrawipf/OpenFFBoard | Firmware/FFBoard/Src/ringbufferwrapper.ll | ZN17RingBufferWrapperC2EPhj | MIT |
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%class.RingBufferWrapper = type <{ ptr, %struct.RingBuffer, i8, [7 x i8] }>
%struct.RingBuffer = type { i64, i64, i64, ptr }
@_ZTV17RingBufferWrapper = external dso_local un... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%STRUCT0 = type <{ ptr, %STRUCT1, i8, [7 x i8] }>
%STRUCT1 = type { i64, i64, i64, ptr }
@_ZTV17RingBufferWrapper = external dso_local unnamed_addr constant { [4 x ptr] }, ali... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@_ZTV17RingBufferWrapper = external dso_local unnamed_addr constant { [4 x ptr] }, align 8
; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ... | CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass | 42ad0941dcf4fb32 | Ultrawipf/OpenFFBoard | Firmware/FFBoard/Src/ringbufferwrapper.ll | ZN17RingBufferWrapperC2Ej | MIT |
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN17RingBufferWrapperD0Ev(ptr noundef nonnull align 8 dereferenceable(41) %0) unnamed_addr #0 align 2 ... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN17RingBufferWrapperD0Ev(ptr noundef nonnull align 8 dereferenceable(41) %0) unnamed_addr #0 align 2 {... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN17RingBufferWrapperD0Ev(ptr noundef nonnull align 8 dereferenceable(41) %0) unnamed_addr #0 align 2 ... | CorrelatedValuePropagationPass,GlobalOptPass,SROAPass,TailCallElimPass | 4349933aa71dc6fe | Ultrawipf/OpenFFBoard | Firmware/FFBoard/Src/ringbufferwrapper.ll | ZN17RingBufferWrapperD0Ev | MIT |
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%class.RingBufferWrapper = type <{ ptr, %struct.RingBuffer, i8, [7 x i8] }>
%struct.RingBuffer = type { i64, i64, i64, ptr }
@_ZTV17RingBufferWrapper = external dso_local un... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%STRUCT0 = type <{ ptr, %STRUCT1, i8, [7 x i8] }>
%STRUCT1 = type { i64, i64, i64, ptr }
@_ZTV17RingBufferWrapper = external dso_local unnamed_addr constant { [4 x ptr] }, ali... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@_ZTV17RingBufferWrapper = external dso_local unnamed_addr constant { [4 x ptr] }, align 8
; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnam... | CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass | fb08b30d6999eb69 | Ultrawipf/OpenFFBoard | Firmware/FFBoard/Src/ringbufferwrapper.ll | ZN17RingBufferWrapperD2Ev | MIT |
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%class.Community_Finder = type { ptr, %"class.std::vector.7", %"class.std::vector.12" }
%"class.std::vector.7" = type { %... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%STRUCT0 = type { ptr, %"class.std::vector.7", %"class.std::vector.12" }
%"class.std::vector.7" = type { %"struct.std::_Ve... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm... | EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass | 1c08c864c1fd6053 | conradlee/network-community-benchmark | comm_algs/GCECommunityFinder/Community_Finder.ll | ZN16Community_Finder10printSeedsEv | BSD-2-Clause |
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::io... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios... | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::io... | EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass | 41d8562b1c90206c | conradlee/network-community-benchmark | comm_algs/GCECommunityFinder/Community_Finder.ll | ZN16Community_Finder12sweepTheDeadEv | BSD-2-Clause |
Dataset Card for IR-OptSet
IR-OptSet is a publicly available dataset designed to advance the use of large language models (LLMs) in compiler optimization. It leverages LLVM—one of the most widely adopted modern compilers—and focuses on its intermediate representation (IR) as the foundation of the dataset. IR-OptSet contains 170,000 IR samples curated from 1,704 GitHub repositories across diverse domains. The dataset provides a comprehensive resource for training and evaluating models in the field of IR-level compiler optimizations.
Dataset Details
Description
- Languages: LLVM Intermediate Representation (LLVM IR)
- Size: ~170,000 IR samples
- Effective Optimizations: >4.3 million annotations
Source
- Repositories: 1,704 open-source GitHub repositories
- Link: IR-OptSet on Hugging Face
Intended Uses
IR-OptSet is suitable for the following use cases:
- IR Understanding: Train models to extract structural and semantic information from LLVM IR code.
- IR Analysis: Evaluate model ability to understand and analyze basic properties of LLVM IR, such as dominator trees, loop structures, and memory dependencies.
- Optimized Code Generation: Use LLMs to generate optimized IR from unoptimized input.
Out-of-Scope Uses
- Non-Compiler Tasks: The dataset is specifically tailored to IR-level optimization tasks and may not generalize well to unrelated domains.
Dataset Structure
Each record in IR-OptSet includes:
original_ir: Unoptimized LLVM IR (viaclang/clang++ -Xclang -disable-llvm-passes)preprocessed_ir: Cleaned version of the original IRo3_ir: Optimized IR generated viaopt -passes='default<O3>'o3_active_passes: Effective passes during O3 compilingstructural_hash: Unique structurehash of the IR, viaopt -passes='print<structural-hash><detailed>repo_name: Source GitHub repositoryrepo_file_path: File path within the repositoryfunction_name: IR function namerepo_license: Associated license
Each
.parquetfile contains ~8,500 examples.
Dataset Creation
Collection and Preprocessing
- Selection: Repositories were manually filtered for compilation relevance and diversity across domains.
- Preprocessing:
- Local variable renaming
- Basic block renaming
- Struct name normalization
- Whitespace and comment removal
- Insertion of missing basic block headers where needed
All transformations preserve the semantic and structural fidelity of the IR.
- Domains:
- High-Performance Computing (HPC)
- Machine Learning
- Multimedia
- Embedded Systems
- System Software
- Security
- Reusable Libraries
- Algorithms
| Domain | Description | #Repos | #LLVM IR | #Total Eff. Opt. | Avg. Eff. Opt. Steps |
|---|---|---|---|---|---|
| High-Performance Computing (HPC) | Loop-intensive, memory-bound workloads; key targets for vectorization, parallelism, and memory locality optimizations. | 275 | 17,145 | 399,110 | 23.28 |
| Machine Learning | Compute-bound code; used for parallel execution. | 95 | 9,366 | 249,467 | 26.64 |
| Multimedia | SIMD-intensive, throughput-sensitive workloads; targets loop optimizations. | 174 | 15,019 | 338,699 | 22.55 |
| Embedded Systems | Resource-constrained (size, energy, real-time); compilers optimize for minimal footprint and energy efficiency. | 108 | 5,942 | 129,449 | 21.79 |
| System Software | Includes OS kernels, runtime systems, allocators; requires low-level control, safety, and instruction-level optimization. | 93 | 6,581 | 136,688 | 20.77 |
| Security | Demands high performance and strict constant-time behavior; requires careful register use, vectorization, and avoidance of side-channel vulnerabilities during optimization. | 94 | 9,252 | 184,329 | 19.92 |
| Reusable Libraries | Common code reused across domains; compilers apply inlining, and target-specific tuning. | 106 | 7,664 | 157,162 | 20.51 |
| Algorithms | Classical algorithms (e.g., sorting); compiler optimizations target computation and memory. | 759 | 99,595 | 2,754,505 | 27.66 |
| Total | - | 1,704 | 170,564 | 4,349,409 | Avg: 22.89 |
Citation
BibTeX
@misc{iropti2025,
title={IR-Optset: An Optimization-Sensitive Dataset for Advancing LLM-Based IR Optimizer},
author={Zi Yang, Lei Qiu, Fang Lyu, Ming Zhong, Zhilei Chai, Haojie Zhou, Huimin Cui, Xiaobing Feng},
year={2025},
url={https://huggingface.co/datasets/YangziResearch/IR-OptSet}
}
We also provide an open-source toolchain for building similar datasets. If you're interested in generating your own optimization corpus, feel free to use our tools. (https://github.com/yilingqinghan/IR-OptSet)
- Downloads last month
- 191