unknown commited on
Commit
9846f1a
·
1 Parent(s): 4ed1610

update readme

Browse files
Files changed (1) hide show
  1. README.md +90 -7
README.md CHANGED
@@ -1,7 +1,90 @@
1
- ---
2
- license: cc-by-4.0
3
- tags:
4
- - code
5
- size_categories:
6
- - 100K<n<1M
7
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ComBack: A Versatile Dataset for Enhancing Compiler Backend Development Efficiency
2
+
3
+ ComBack is a large-scale multi-platform compiler backend code dataset.
4
+ ComBack is sourced from GCC and LLVM backends corresponding to 178 target platforms.
5
+
6
+ ## Dataset Information
7
+
8
+ - Source Data
9
+ - GCC
10
+
11
+ | Category | Target Platform | Function | KLoC |
12
+ | ---- | ---- | ---- | ---- |
13
+ | CPU | 30 | 35,147 | 647.2 |
14
+ | MPU | 33 | 6,010 | 183.9 |
15
+ | GPU | 2 | 457 | 11.2 |
16
+ | VLIW | 5 | 959 | 25.4 |
17
+ | DSP | 3 | 399 | 9.6 |
18
+ | Virtual | 4 | 327 | 6.5 |
19
+ | **SUM** | **77** | **43,299** | **883.7** |
20
+
21
+
22
+ - LLVM
23
+
24
+ | Category | Target Platform | Function | KLoC |
25
+ | ---- | ---- | ---- | ---- |
26
+ | CPU | 43 | 84,914 | 3,450.4 |
27
+ | MPU | 30 | 11,311 | 173.0 |
28
+ | GPU | 5 | 22,591 | 768.3 |
29
+ | VLIW | 4 | 2,048 | 24.3 |
30
+ | DSP | 7 | 9,646 | 263.2 |
31
+ | Virtual | 12 | 8,430 | 168.3 |
32
+ | **SUM** | **101** | **138,940** | **4,847.5** |
33
+
34
+
35
+ - Tasks
36
+ - Statement-Level Completion: complete current statement.
37
+ ```c++
38
+ //Inputs:
39
+ ...
40
+ adjustReg(MBB,LastFrameDestroy, DL, SPReg, FPReg, -StackSize+RVFI->getVarArgsSaveSize()
41
+ //Ground Truth:
42
+ MachineInstr::FrameDestroy);
43
+ ```
44
+
45
+ - Next-Statement Suggestion: predict the next statement.
46
+
47
+ ```c++
48
+ //Inputs:
49
+ ...
50
+ maxCallFrameSize = (maxCallFrameSize + AlignMask) & ~AlignMask;
51
+ //Ground Truth:
52
+ MFI -> setMaxCallFrameSize(maxCallFrameSize);
53
+ ```
54
+
55
+
56
+ - Code Generation: generate a function with function description in natrual language.
57
+
58
+ ```c++
59
+ //Inputs:
60
+ getPointerRegClass: Returns a TargetRegisterClass used for pointer values.
61
+ Target-Specific Value: Sparc, SP::I64RegsRegClass, SP::IntRegsRegClass.
62
+ //Ground Truth:
63
+ TargetRegisterClass *SparcRegisterInfo::getPointerRegClass(MachineFunction &MF ,unsigned Kind) {
64
+ return Subtarget.is64Bit() ? &SP::I64RegsRegClass : &SP::IntRegsRegClass;
65
+ }
66
+ ```
67
+
68
+ ## Organization
69
+
70
+ - `Existing_Targets/*`: **split data of 178 backends into train/valid/test set in the ratio of 80%:10%:10%**
71
+
72
+ | Task | Train | Valid | Test |
73
+ | ---- | ---- | ---- | ---- |
74
+ | Statement-Level Comp. | 128,899(11.36M Token) | 16,112(1.43M Token) | 16,113(1.43M Token) |
75
+ | Next-Statement Sugg. | 173,052(15.69M Token) | 21,631(1.99M Token) | 21,632(1.98M Token) |
76
+ | Code Generation. | 36,236(5.10M Token) | 4,530(0.64M Token) | 4,530(0.64M Token) |
77
+
78
+
79
+ - `New_Targets/*`: **Take data of RISC-V,ARC,NVPTX both in GCC and LLVM as test set, split train/valid set in the ratio of 85%:15% of other 171(178 - 2*3 - 1) targets excluding RI5CY(RI5CY is custmoized based on RISCV)**
80
+
81
+
82
+
83
+ | Task | Train | Valid | Test |
84
+ | ---- | ---- | ---- | ---- |
85
+ | Statement-Level Comp. | 114,016(10.20M Token) | 20,121(1.81M Token) | 6,645(0.58M Token) |
86
+ | Next-Statement Sugg. | 152,114(14.10M Token) | 26,844(2.49M Token) | 9,313(0.83M Token) |
87
+ | Code Generation. | 30,633(4.44M Token) | 5,406(0.79M Token) | 2,819(0.37M Token) |
88
+
89
+ ## License
90
+ The dataset is licensed under a [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) license.