Back in https://reviews.llvm.org/D124490 we added a block coverage mode that instruments a subset of basic blocks using single byte counters to get coverage for the whole function. This commit adds a test to make sure that we correctly assign branch weights based on the coverage profile. I noticed this test was missing after seeing that we had no coverage on `PGOUseFunc::populateCoverage()` https://lab.llvm.org/coverage/coverage-reports/coverage/Users/buildslave/jenkins/workspace/coverage/llvm-project/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp.html#L1383
55 lines
423 B
Plaintext
55 lines
423 B
Plaintext
:ir
|
|
:single_byte_coverage
|
|
|
|
foo
|
|
# Func Hash:
|
|
848064302753700500
|
|
# Num Counters:
|
|
2
|
|
# Counter Values:
|
|
3
|
|
4
|
|
|
|
|
|
bar
|
|
# Func Hash:
|
|
848064302952419074
|
|
# Num Counters:
|
|
2
|
|
# Counter Values:
|
|
2
|
|
0
|
|
|
|
|
|
goo
|
|
# Func Hash:
|
|
1106497858086895615
|
|
# Num Counters:
|
|
1
|
|
# Counter Values:
|
|
5
|
|
|
|
|
|
loop
|
|
# Func Hash:
|
|
92940490389974880
|
|
# Num Counters:
|
|
2
|
|
# Counter Values:
|
|
1
|
|
1
|
|
|
|
|
|
hoo
|
|
# Func Hash:
|
|
1073332642652768409
|
|
# Num Counters:
|
|
6
|
|
# Counter Values:
|
|
1
|
|
0
|
|
1
|
|
1
|
|
0
|
|
0
|