Dataset Card for ExeBench-IRIS
ExeBench-IRIS is a test-set designed to assess Large Language Models on compiler Intermediate Representation (IR) translation tasks. Specifically, we use it to evaluate GIMPLE-to-LLVM IR neural translation. It contains 1,321 executable C functions with their corresponding GIMPLE and LLVM IR representations, with 10 I/O tests each.
Dataset Structure
idc_snippet: C source codegimple_ir: GIMPLE IR generated by GCC v15.llvm_ir: LLVM IR generated by Clang v22.wrapper: C++ test harness for executing and validating the codeio_pairs: I/O test cases
Usage
from datasets import load_dataset
import json
# Load dataset
ds = load_dataset("HPAI-BSC/ExeBench-IRIS")
# Example evaluation
sample = ds["test"][0]
gimple_ir = sample["gimple_ir"]
wrapper = sample["wrapper"]
io_pairs = sample["io_pairs"]
# 1. Model translates GIMPLE IR to LLVM IR
llvm_ir = ...
# 2. Save and compile LLVM IR (Syntax check)
with open("main.ll", "w") as f:
f.write(llvm_ir)
!llc -filetype=obj main.ll -o main.o
!g++ -std=c++11 -fpermissive wrapper.cpp main.o -o binary -I/usr/local/include
# 3. Run tests (Functionality check)
for i, test in enumerate(io_pairs):
input_data = json.loads(test["input"])
expected_output = json.loads(test["output"])
with open(f"input_{i}.json", "w") as f:
json.dump(input_data, f)
!./binary input_{i}.json output_{i}.json
with open(f"output_{i}.json") as f:
actual_output = json.load(f)
assert actual_output == expected_output
Note: io_pairs contains JSON strings for input and output. Parse them with json.loads() before use
Dataset Creation
The dataset is derived from ExeBench (Armengol-Estapé et al., 2022), which contains executable C functions extracted from real code repositories on GitHub. The original ExeBench test real partition contained 2,134 samples.
The dataset creation involved a multi-stage pipeline:
Dataset Creation: Pre-processing pipeline
This workflow evaluates both syntax (does the LLVM IR compile?) and functionality (does the LLVM IR pass all tests?).
Dataset Creation: Filtering
We verified and filtered the original dataset:
| Stage | Sample Count | Description |
|---|---|---|
| ExeBench test_real | 2,134 | Starting dataset |
| Compile verification (GCC & Clang) | 1,782 | Samples that successfully compile with both compilers |
| Test verification | 1,321 | Samples that pass I/O tests with both compilers |
Citation
If you use this dataset, please cite:
@article{ramirez2026llm,
title={LLM Translation of Compiler Intermediate Representation},
author={Valenzuela-Ramirez, Andrea and Gutierrez-Gomez, Cristian and Barroso, Marta and Garcia-Gasulla, Dario and Royuela, Sara},
journal={arXiv preprint arXiv:2605.08247},
year={2026}
}
And the original ExeBench dataset:
@inproceedings{10.1145/3520312.3534867,
author = {Armengol-Estap\'{e}, Jordi and Woodruff, Jackson and Brauckmann, Alexander and Magalh\~{a}es, Jos\'{e} Wesley de Souza and O'Boyle, Michael F. P.},
title = {ExeBench: An ML-Scale Dataset of Executable C Functions},
year = {2022},
isbn = {9781450392730},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3520312.3534867},
doi = {10.1145/3520312.3534867},
abstract = {Machine-learning promises to transform compilation and software engineering, yet is frequently limited by the scope of available datasets. In particular, there is a lack of runnable, real-world datasets required for a range of tasks ranging from neural program synthesis to machine learning-guided program optimization. We introduce a new dataset, ExeBench, which attempts to address this. It tackles two key issues with real-world code: references to external types and functions and scalable generation of IO examples. ExeBench is the first publicly available dataset that pairs real-world C code taken from GitHub with IO examples that allow these programs to be run. We develop a toolchain that scrapes GitHub, analyzes the code, and generates runnable snippets of code. We analyze our benchmark suite using several metrics, and show it is representative of real-world code. ExeBench contains 4.5M compilable and 700k executable C functions. This scale of executable, real functions will enable the next generation of machine learning-based programming tasks.},
booktitle = {Proceedings of the 6th ACM SIGPLAN International Symposium on Machine Programming},
pages = {50–59},
numpages = {10},
keywords = {Code Dataset, Program Synthesis, Mining Software Repositories, C, Machine Learning for Code, Compilers},
location = {San Diego, CA, USA},
series = {MAPS 2022}
}
- Downloads last month
- 9