forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[InstrProf] Add pgo use block coverage test (llvm#72443)
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
- Loading branch information
Showing
4 changed files
with
86 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
: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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters