diff --git a/propeller/testdata/BUILD b/propeller/testdata/BUILD index 276f3fa889f..00e42ab66b7 100644 --- a/propeller/testdata/BUILD +++ b/propeller/testdata/BUILD @@ -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", diff --git a/propeller/testdata/loop_no_entry_no_exit.protobuf b/propeller/testdata/loop_no_entry_no_exit.protobuf new file mode 100644 index 00000000000..adf53e2a32b --- /dev/null +++ b/propeller/testdata/loop_no_entry_no_exit.protobuf @@ -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 + } +}