Datasets:
|
Download README.md from HPAI-BSC/TheStack-IRIS: direct link, hf CLI and curl.
- Browser
- Download file 3.62 kB
-
https://huggingface.co/datasets/HPAI-BSC/TheStack-IRIS/resolve/main/README.md
- Command line
-
hf download hf://datasets/HPAI-BSC/TheStack-IRIS/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/datasets/HPAI-BSC/TheStack-IRIS/resolve/main/README.md
3.62 kB
| task_categories: | |
| - translation | |
| language: | |
| - en | |
| tags: | |
| - llvm | |
| - gimple | |
| - gcc | |
| - clang | |
| - compiler | |
| - intermediate-representation | |
| - compiler-ir | |
| - ir | |
| - the-stack | |
| pretty_name: TheStack-IRIS | |
| size_categories: | |
| - 100K<n<1M | |
| # Dataset Card for TheStack-IRIS | |
| TheStack-IRIS is a training dataset for GIMPLE IR to LLVM IR translation, derived from [The Stack v1 (dedup)](https://huggingface.co/datasets/bigcode/the-stack-dedup). It contains ~310k C code samples paired with their corresponding GIMPLE and LLVM intermediate representations. | |
| ## Dataset Structure | |
| The dataset extends The Stack with additional IR fields: | |
| - `content`: C source code | |
| - `irs`: Dictionary containing intermediate representations: | |
| - `gcc_gimple`: GIMPLE IR generated by GCC v15.2.0 | |
| - `clang`: LLVM IR generated by Clang v22.0.0 | |
| - `max_stars_repo_name`: Repository name for attribution | |
| - `max_stars_repo_licenses`: Repository licenses | |
| ## Usage | |
| ```python | |
| from datasets import load_dataset | |
| # Load dataset | |
| ds = load_dataset("HPAI-BSC/TheStack-IRIS", split="train") | |
| # Example: access a sample | |
| sample = ds[0] | |
| c_code = sample["content"] | |
| gimple_ir = sample["irs"]["gcc_gimple"] | |
| llvm_ir = sample["irs"]["clang"] | |
| repo_name = sample["max_stars_repo_name"] | |
| ``` | |
| ## Dataset Creation | |
| TheStack-IRIS is created by filtering [The Stack v1 (dedup)](https://huggingface.co/datasets/bigcode/the-stack-dedup) C samples and extending them with intermediate representations: | |
| | Stage | # Samples | Description | | |
| |-------|-----------|-------------| | |
| | The Stack C samples | 8,625,559 | Original C code from The Stack | | |
| | License filtering | 8,136,034 | Samples with permissive open-source licenses | |
| | Compile successfully | 867,101 | Samples that compile with both GCC v15.2.0 and Clang v22.0.0 | |
| | IR generation | 306,841 | Samples with GIMPLE and LLVM IR aligned pairs | |
| ### Filtering Process | |
| 1. Selected C language samples from [The Stack v1 (dedup)](https://huggingface.co/datasets/bigcode/the-stack-dedup) | |
| 2. Compiled each sample with GCC v15.2.0 and Clang v22.0.0 at `-O0` | |
| 3. Retained samples that compile successfully with both compilers | |
| 4. Generated GIMPLE using `gcc -fdump-tree-gimple -O0` | |
| 5. Generated LLVM IR using `clang -emit-llvm -O0` | |
| The dataset preserves all original The Stack metadata for proper attribution. | |
| ### License | |
| The dataset inherits licenses from The Stack. We used a subset of the top-20 permissive licenses. Each sample includes repository license information in the max_stars_repo_licenses field for proper attribution. | |
| The licenses of this subset include: | |
| ``` | |
| - "MIT" | |
| - "Apache-2.0" | |
| - "BSD-3-Clause" | |
| - "BSD-2-Clause" | |
| - "CC0-1.0" | |
| - "WTFPL" | |
| - "0BSD" | |
| - "FSFAP" | |
| - "Zlib" | |
| - "ECL-2.0" | |
| - "NCSA" | |
| - "BSD-Source-Code" | |
| - "MIT-0" | |
| - "BSL-1.0" | |
| - "X11" | |
| - "Intel" | |
| - "ISC" | |
| - "BSD-2-Clause-FreeBSD" | |
| - "CNRI-Python" | |
| - "BSD-3-Clause-Clear" | |
| - "PSF-2.0" | |
| - "LPL-1.02" | |
| ``` | |
| ### Citation | |
| If you use this dataset, please cite: | |
| ```bibtex | |
| @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 The Stack dataset: | |
| ```bibtex | |
| @article{kocetkov2022stack, | |
| title={The Stack: 3 TB of permissively licensed source code}, | |
| author={Kocetkov, Denis and Li, Raymond and Allal, Loubna Ben and Li, Jia and Mou, Chenghao and Ferrandis, Carlos Mu{\~n}oz and Jernite, Yacine and Mitchell, Margaret and Hughes, Sean and Wolf, Thomas and others}, | |
| journal={arXiv preprint arXiv:2211.15533}, | |
| year={2022} | |
| } | |
| ``` | |