Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a testdata proto for a function call within a loop #192

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions propeller/testdata/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ exports_files([
"all_cold_landing_pads.protobuf",
"bimodal_sample.bin",
"bimodal_sample.x.bin",
"call_from_simple_loop.protobuf",
"clang_v0_labels.binary",
"llvm_function_samples.binary",
"llvm_function_samples_perf.data",
Expand Down
87 changes: 87 additions & 0 deletions propeller/testdata/call_from_simple_loop.protobuf
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
## CFG consisting of a function calling another function in a simple loop.
##
## foo <------- baz
## | 100
## 5 |
## |
## v 100
## +---> foo.1 -------> bar
## | |
## | 100 |100
## | |
## | v
## +--- foo.2
##

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