Skip to content

Commit

Permalink
Add testdata for a loop with cold entry and exit edges
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 696893941
  • Loading branch information
dhoekwater authored and copybara-github committed Nov 15, 2024
1 parent afd57b2 commit 319bd7f
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
1 change: 1 addition & 0 deletions propeller/testdata/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ exports_files([
"hot_and_cold_landing_pads.protobuf",
"llvm_function_samples.binary",
"llvm_function_samples_perf.data",
"loop_no_entry_no_exit.protobuf",
"propeller_sample.protobuf",
"propeller_sample_1.bin",
"sample.bin",
Expand Down
71 changes: 71 additions & 0 deletions propeller/testdata/loop_no_entry_no_exit.protobuf
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
## CFG Proto for a function consisting of a simple loop with cold entry and exit
## edges.
##
## foo
## |
## |0
## V
## a.BB.foo <--+
## | |
## | |45
## |40 |
## | |
## v |
## aa.BB.foo ---+
## |
## | 0
## v
## raa.BB.foo

cfg {
name: "foo"
function_index: 0
node {
bb_id: 0
size: 10
out_edges {
sink: {
function_index: 0
bb_index: 1
}
weight: 0
kind: BRANCH_OR_FALLTHROUGH
}
}
node {
bb_id: 1
size: 6
out_edges {
sink: {
function_index: 0
bb_index: 2
}
weight: 40
kind: BRANCH_OR_FALLTHROUGH
}
}
node {
bb_id: 2
size: 4
out_edges {
sink: {
function_index: 0
bb_index: 3
}
weight: 0
kind: BRANCH_OR_FALLTHROUGH
}
out_edges {
sink: {
function_index: 0
bb_index: 1
}
weight: 45
kind: BRANCH_OR_FALLTHROUGH
}
}
node {
bb_id: 3
size: 3
}
}

0 comments on commit 319bd7f

Please sign in to comment.