forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Coverage] Let
Decision
take account of expansions (llvm#78969)
The current implementation (D138849) assumes `Branch`(es) would follow after the corresponding `Decision`. It is not true if `Branch`(es) are forwarded to expanded file ID. As a result, consecutive `Decision`(s) would be confused with insufficient number of `Branch`(es). `Expansion` will point `Branch`(es) in other file IDs if `Expansion` is included in the range of `Decision`. Fixes llvm#77871 --------- Co-authored-by: Alan Phipps <a-phipps@ti.com> (cherry picked from commit d912f1f)
- Loading branch information
Showing
5 changed files
with
378 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#define C c | ||
#define D 1 | ||
#define E (C != a) && (C > a) | ||
#define F E | ||
|
||
void __attribute__((noinline)) func1(void) { return; } | ||
|
||
void __attribute__((noinline)) func(int a, int b, int c) { | ||
if (a && D && E || b) | ||
func1(); | ||
if (b && D) | ||
func1(); | ||
if (a && (b && C) || (D && F)) | ||
func1(); | ||
} | ||
|
||
int main() { | ||
func(2, 3, 3); | ||
return 0; | ||
} |
Binary file not shown.
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,62 @@ | ||
func | ||
# Func Hash: | ||
395201011017399473 | ||
# Num Counters: | ||
22 | ||
# Counter Values: | ||
1 | ||
1 | ||
0 | ||
0 | ||
1 | ||
1 | ||
1 | ||
1 | ||
1 | ||
1 | ||
1 | ||
1 | ||
1 | ||
1 | ||
0 | ||
1 | ||
1 | ||
1 | ||
0 | ||
0 | ||
0 | ||
0 | ||
# Num Bitmap Bytes: | ||
$13 | ||
# Bitmap Byte Values: | ||
0x0 | ||
0x0 | ||
0x0 | ||
0x20 | ||
0x8 | ||
0x0 | ||
0x20 | ||
0x0 | ||
0x0 | ||
0x0 | ||
0x0 | ||
0x0 | ||
0x0 | ||
|
||
|
||
func1 | ||
# Func Hash: | ||
24 | ||
# Num Counters: | ||
1 | ||
# Counter Values: | ||
3 | ||
|
||
main | ||
# Func Hash: | ||
24 | ||
# Num Counters: | ||
1 | ||
# Counter Values: | ||
1 | ||
|
Oops, something went wrong.