Skip to content

Commit

Permalink
Add testdata for a function with multiple cold basic blocks
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 696911074
  • Loading branch information
dhoekwater authored and copybara-github committed Nov 15, 2024
1 parent 319bd7f commit 390f4a4
Show file tree
Hide file tree
Showing 2 changed files with 42 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 @@ -39,6 +39,7 @@ exports_files([
"llvm_function_samples.binary",
"llvm_function_samples_perf.data",
"loop_no_entry_no_exit.protobuf",
"multiple_cold_blocks.protobuf",
"propeller_sample.protobuf",
"propeller_sample_1.bin",
"sample.bin",
Expand Down
41 changes: 41 additions & 0 deletions propeller/testdata/multiple_cold_blocks.protobuf
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## CFG Proto for a function consisting of three cold blocks and two hot blocks.
##
## foo
##
## foo.2 foo.4
##
## 40
## foo.3 -----> foo.1

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

0 comments on commit 390f4a4

Please sign in to comment.