Skip to content

Commit b74e784

Browse files
dhoekwatercopybara-github
authored andcommitted
Add a test data file where EH landing pads are cold
PiperOrigin-RevId: 696880666
1 parent 423af57 commit b74e784

File tree

2 files changed

+140
-0
lines changed

2 files changed

+140
-0
lines changed

propeller/testdata/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ _LLVM_PROPELLER_TESTDATA_TOOLCHAINS = [
3030
]
3131

3232
exports_files([
33+
"all_cold_landing_pads.protobuf",
3334
"bimodal_sample.bin",
3435
"bimodal_sample.x.bin",
3536
"clang_v0_labels.binary",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
## CFG Proto for two functions: Function foo has two exception handling landing
2+
## pads which are both cold.
3+
##
4+
##
5+
## 20
6+
## +-----------------+
7+
## | |
8+
## v 20 |
9+
## foo -------------> bar
10+
## / \
11+
## 20 / \ 0
12+
## v v [eh pad]
13+
## foo.1 foo.2 ----+
14+
## / \ |
15+
## 20 / \ 0 |
16+
## v v |
17+
## foo.4 foo.3 [eh pad] |
18+
## \ / | 0
19+
## 20 \ /0 |
20+
## \ / |
21+
## v v |
22+
## foo.5 <-------------+
23+
##
24+
25+
cfg {
26+
name: "foo"
27+
function_index: 100
28+
node {
29+
bb_id: 0
30+
size: 10
31+
out_edges {
32+
sink : {
33+
function_index: 100
34+
bb_index: 1
35+
}
36+
weight: 20
37+
kind: BRANCH_OR_FALLTHROUGH
38+
}
39+
out_edges {
40+
sink : {
41+
function_index: 100
42+
bb_index: 2
43+
}
44+
weight: 0
45+
kind: BRANCH_OR_FALLTHROUGH
46+
}
47+
out_edges {
48+
sink : {
49+
function_index: 200
50+
bb_index: 0
51+
}
52+
weight: 20
53+
kind: CALL
54+
}
55+
}
56+
node {
57+
bb_id: 1
58+
size: 10
59+
out_edges {
60+
sink : {
61+
function_index: 100
62+
bb_index: 4
63+
}
64+
weight: 20
65+
kind: BRANCH_OR_FALLTHROUGH
66+
}
67+
out_edges {
68+
sink : {
69+
function_index: 100
70+
bb_index: 3
71+
}
72+
weight: 0
73+
kind: BRANCH_OR_FALLTHROUGH
74+
}
75+
}
76+
node {
77+
bb_id: 2
78+
size: 10
79+
metadata {
80+
is_landing_pad: true
81+
}
82+
out_edges {
83+
sink : {
84+
function_index: 100
85+
bb_index: 5
86+
}
87+
weight: 0
88+
kind: BRANCH_OR_FALLTHROUGH
89+
}
90+
}
91+
node {
92+
bb_id: 3
93+
size: 10
94+
metadata {
95+
is_landing_pad: true
96+
} out_edges {
97+
sink : {
98+
function_index: 100
99+
bb_index: 5
100+
}
101+
weight: 0
102+
kind: BRANCH_OR_FALLTHROUGH
103+
}
104+
}
105+
node {
106+
bb_id: 4
107+
size: 10
108+
out_edges {
109+
sink : {
110+
function_index: 100
111+
bb_index: 5
112+
}
113+
weight: 20
114+
kind: BRANCH_OR_FALLTHROUGH
115+
}
116+
}
117+
node {
118+
bb_id: 5
119+
size: 10
120+
}
121+
}
122+
123+
cfg {
124+
name: "bar"
125+
function_index: 200
126+
node {
127+
bb_id: 0
128+
size: 10
129+
out_edges {
130+
sink : {
131+
function_index: 100
132+
bb_index: 0
133+
}
134+
weight: 20
135+
kind: RETURN
136+
}
137+
}
138+
}
139+

0 commit comments

Comments
 (0)