File size: 4,767 Bytes
fb08dc4 f8f4794 fb08dc4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
---
pretty_name: "ComBack++"
language:
- code
pipeline_tag: Compiler Backend
tags:
- C++/TableGen/Machine Description Code
- Compiler Backend
license: "cc-by-4.0"
# configs:
# - config_name: Statement-Level Completion
# data_files :
# - split: train
# path: Code_Completion/statement_level/train*
# - split: validation
# path: Code_Completion/statement_level/valid*
# - split: test
# path: Code_Completion/statement_level/test*
# - config_name: Next-Statement Suggestion
# data_files :
# - split: train
# path: Code_Completion/next_statement/train*
# - split: validation
# path: Code_Completion/next_statement/valid*
# - split: test
# path: Code_Completion/next_statement/test*
# - config_name: Code Generation
# data_files :
# - split: train
# path: Code_Generation/train*
# - split: validation
# path: Code_Generation/valid*
# - split: test
# path: Code_Generation/test*
---
# ComBack++: A Multi-Language Dataset Providing End-to-End Support for Compiler Backend Development
ComBack++ is a large-scale, multi-platform and multi-language compiler backend code dataset. It is sourced from GCC and LLVM backends corresponding to 183 target platforms.
## Dataset Information
- Source Data
- GCC
| Category | Target Platform | C++ Function | C++ KLoC | Machine Description KLoC |
| ---- | ---- | ---- | ---- | ---- |
| CPU | 30 | 56,211 | 858.2 | 228.5 |
| MPU | 35 | 8,713 | 243.8 | 87.1 |
| GPU | 2 | 731 | 12.7 | 3.0 |
| VLIW | 5 | 1,323 | 32.8 | 17.8 |
| DSP | 4 | 542 | 17.2 | 6.1 |
| Virtual | 5 | 558 | 10.5 | 0.1 |
| **SUM** | **81** | **68,078** | **1175.2** | **342.6** |
- LLVM
| Category | Target Platform | C++ Function | C++ KLoC | TableGen KLoC |
| ---- | ---- | ---- | ---- | ---- |
| CPU | 43 | 97,972 | 3,768.4 | 1,157.7 |
| MPU | 30 | 12,552 | 190.7 | 24.8 |
| GPU | 5 | 28,267 | 886.8 | 168.5 |
| VLIW | 5 | 2,386 | 27.4 | 0.8 |
| DSP | 7 | 11,584 | 296.8 | 129.4 |
| Virtual | 12 | 10,538 | 199.4 | 12.9 |
| **SUM** | **102** | **163,299** | **5,369.5** | **1,494.1** |
- Tasks
- Statement-Level Completion: complete current statement.
```c++
//Inputs:
...
adjustReg(MBB,LastFrameDestroy, DL, SPReg, FPReg, -StackSize+RVFI->getVarArgsSaveSize()
//Ground Truth:
MachineInstr::FrameDestroy);
```
- Next-Statement Suggestion: predict the next statement.
```c++
//Inputs:
...
maxCallFrameSize = (maxCallFrameSize + AlignMask) & ~AlignMask;
//Ground Truth:
MFI -> setMaxCallFrameSize(maxCallFrameSize);
```
- Code Generation: generate a function template with function description in natrual language.
```c++
//Inputs:
getPointerRegClass: Returns a TargetRegisterClass used for pointer values.
//Ground Truth:
TargetRegisterClass *RegisterInfo::getPointerRegClass(MachineFunction &MF ,unsigned Kind) {
return Subtarget.is64Bit() ? <ISA_LIT> : <ISA_LIT>;
}
```
- Program Repair: automatically fixing bugs at identified locations.
```c++
//Inputs:
int64_t Imm; <BUGS> MCExpr::VariantKind VK; <BUGE> ...
//Ground Truth:
<FIXS> MCExpr::VariantKind VK = MCExpr::VK_None; <FIXE>
```
## Organization
- `./*.jsonl`: **Take data of RISC-V,ARC,NVPTX both in GCC and LLVM as test set, split train/valid set in the ratio of 90%:10% of other targets excluding RI5CY(RI5CY is custmoized based on RISCV)**
| Task | Programming Language | Train | Valid | Test |
|---------------------------- |---------------------- |------------------ |---------------- |--------------- |
| Statement-Level Completion | C++ | 149,368 (16.41M) | 16,480 (1.84M) | 7,897 (0.82M) |
| Statement-Level Completion | TableGen/MD | 120,460 (4.46M) | 13,295 (0.50M) | 7,090 (0.25M) |
| Next-Statement Suggestion | C++ | 137,155 (20.55M) | 15,218 (2.32M) | 8,109 (1.09M) |
| Next-Statement Suggestion | TableGen/MD | 124,528 (6.71M) | 14,009 (0.76M) | 2,726 (0.14M) |
| Code Generation | C++ | 37,805 (10.69M) | 4,137 (1.16M) | 2,944 (0.73M) |
| Program Repair | C++ | 40,578 (4.33M) | 4,539 (0.48M) | 2,623 (0.29M) |
| Program Repair | TableGen/MD | 25,983 (2.95M) | 2,975 (0.33M) | 1,814 (0.24M) |
## Citation
```
@article{zhong2025bepilot,
author = {Zhong, Ming and Sun, Xin and Lv, Fang and Wang, Lulin and Geng, Hongna and Qiu, Lei and Cui, Huimin and Feng, Xiaobing},
title = {BePilot: An AI Programming Assistant for Compiler Backend Development},
year = {2025},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
issn = {1049-331X},
url = {https://doi.org/10.1145/3764585},
doi = {10.1145/3764585},
note = {Just Accepted},
journal = {ACM Trans. Softw. Eng. Methodol.}
}
``` |