@@ -569,16 +577,26 @@ struct CounterCoverageMappingBuilder
/// Return a counter for the subtraction of \c RHS from \c LHS
Counter subtractCounters(Counter LHS, Counter RHS, bool Simplify = true) {
+if (llvm::EnableSingleByteCoverage)
+ assert(
+ 0 &&
+
@@ -821,15 +822,23 @@ void InstrProfRecord::merge(InstrProfRecord &Other,
uint64_t Weight,
for (size_t I = 0, E = Other.Counts.size(); I < E; ++I) {
bool Overflowed;
-uint64_t Value =
-SaturatingMultiplyAdd(Other.Counts[I], Weight, Counts[I], &Overflowed);
-
@@ -821,15 +822,23 @@ void InstrProfRecord::merge(InstrProfRecord &Other,
uint64_t Weight,
for (size_t I = 0, E = Other.Counts.size(); I < E; ++I) {
bool Overflowed;
-uint64_t Value =
-SaturatingMultiplyAdd(Other.Counts[I], Weight, Counts[I], &Overflowed);
-
https://github.com/gulfemsavrun edited
https://github.com/llvm/llvm-project/pull/75425
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/gulfemsavrun updated
https://github.com/llvm/llvm-project/pull/75425
>From 5553825da82306a3bb0b959f4cbfadc624b1d14f Mon Sep 17 00:00:00 2001
From: Gulfem Savrun Yeniceri
Date: Thu, 14 Dec 2023 03:40:57 +
Subject: [PATCH] [InstrProf] Single byte counters in coverage
This
@@ -821,15 +822,23 @@ void InstrProfRecord::merge(InstrProfRecord &Other,
uint64_t Weight,
for (size_t I = 0, E = Other.Counts.size(); I < E; ++I) {
bool Overflowed;
-uint64_t Value =
-SaturatingMultiplyAdd(Other.Counts[I], Weight, Counts[I], &Overflowed);
-
https://github.com/gulfemsavrun updated
https://github.com/llvm/llvm-project/pull/75425
>From ee88c6e666759c27587f900c99a4aba23c0d4cf4 Mon Sep 17 00:00:00 2001
From: Gulfem Savrun Yeniceri
Date: Thu, 14 Dec 2023 03:40:57 +
Subject: [PATCH] [InstrProf] Single byte counters in coverage
This
ellishg wrote:
LGTM, but I'm less familiar with the clang coverage code. So I'll give others
some time to accept.
https://github.com/llvm/llvm-project/pull/75425
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/m
@@ -1519,38 +1543,53 @@ struct CounterCoverageMappingBuilder
}
// Create Branch Region around condition.
-createBranchRegion(S->getCond(), BodyCount,
- subtractCounters(CondCount, BodyCount));
+if (!llvm::EnableSingleByteCoverage)
+ c
@@ -1519,38 +1543,53 @@ struct CounterCoverageMappingBuilder
}
// Create Branch Region around condition.
-createBranchRegion(S->getCond(), BodyCount,
- subtractCounters(CondCount, BodyCount));
+if (!llvm::EnableSingleByteCoverage)
+ c
https://github.com/evodius96 approved this pull request.
LGTM. I would like to see this broadened to include branch coverage as well!
https://github.com/llvm/llvm-project/pull/75425
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.
https://github.com/gulfemsavrun updated
https://github.com/llvm/llvm-project/pull/75425
>From 904957a034582f2d8805530bc51dad3df0f6 Mon Sep 17 00:00:00 2001
From: Gulfem Savrun Yeniceri
Date: Thu, 14 Dec 2023 03:40:57 +
Subject: [PATCH] [InstrProf] Single byte counters in coverage
This
https://github.com/gulfemsavrun closed
https://github.com/llvm/llvm-project/pull/75425
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1503,38 +1527,53 @@ struct CounterCoverageMappingBuilder
}
// Create Branch Region around condition.
-createBranchRegion(S->getCond(), BodyCount,
- subtractCounters(CondCount, BodyCount));
+if (!llvm::EnableSingleByteCoverage)
+ c
https://github.com/gulfemsavrun edited
https://github.com/llvm/llvm-project/pull/75425
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1282,8 +1283,14 @@ class SegmentBuilder {
// value for that area.
// We add counts of the regions of the same kind as the active region
// to handle the both situations.
- if (I->Kind == Active->Kind)
-Active->ExecutionCount += I->ExecutionCou
https://github.com/rnk commented:
What are the next steps to work to land this? We're interested to try this out
for Chrome!
https://github.com/llvm/llvm-project/pull/75425
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org
https://github.com/gulfemsavrun updated
https://github.com/llvm/llvm-project/pull/75425
>From 4dd98d84d45e960fe655b23c7b6ec7b4b5ea0114 Mon Sep 17 00:00:00 2001
From: Gulfem Savrun Yeniceri
Date: Thu, 14 Dec 2023 03:40:57 +
Subject: [PATCH] [InstrProf] Single byte counters in coverage
This
@@ -569,16 +577,26 @@ struct CounterCoverageMappingBuilder
/// Return a counter for the subtraction of \c RHS from \c LHS
Counter subtractCounters(Counter LHS, Counter RHS, bool Simplify = true) {
+if (llvm::EnableSingleByteCoverage)
+ assert(
+ 0 &&
+
@@ -234,8 +246,20 @@ struct MapRegionCounters : public
RecursiveASTVisitor {
if (Hash.getHashVersion() == PGO_HASH_V1)
return Base::TraverseIfStmt(If);
+// When single byte coverage mode is enabled, add a counter to then and
+// else.
+for (Stmt *CS : If
@@ -821,15 +822,23 @@ void InstrProfRecord::merge(InstrProfRecord &Other,
uint64_t Weight,
for (size_t I = 0, E = Other.Counts.size(); I < E; ++I) {
bool Overflowed;
-uint64_t Value =
-SaturatingMultiplyAdd(Other.Counts[I], Weight, Counts[I], &Overflowed);
-
https://github.com/gulfemsavrun updated
https://github.com/llvm/llvm-project/pull/75425
>From d98bf5ae49caee5d5539f5104011c6d1e217e6c6 Mon Sep 17 00:00:00 2001
From: Gulfem Savrun Yeniceri
Date: Thu, 14 Dec 2023 03:40:57 +
Subject: [PATCH] [InstrProf] Single byte counters in coverage
This
gulfemsavrun wrote:
> What are the next steps to work to land this? We're interested to try this
> out for Chrome!
We just need to land this :)
https://github.com/llvm/llvm-project/pull/75425
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
23 matches
Mail list logo