@@ -275,49 +276,57 @@ struct MapRegionCounters : public
RecursiveASTVisitor {
// an AST Stmt node. MC/DC will use it to to signal when the top of a
// logical operation (boolean expression) nest is encountered.
bool dataTraverseStmtPost(Stmt *S) {
-/// If MC/DC is n
@@ -228,45 +228,46 @@ struct MapRegionCounters : public
RecursiveASTVisitor {
/// The stacks are also used to find error cases and notify the user. A
/// standard logical operator nest for a boolean expression could be in a
form
/// similar to this: "x = a && b && c &&
@@ -1245,9 +1245,29 @@ void CodeGenPGO::emitMCDCParameters(CGBuilderTy
&Builder) {
CGM.getIntrinsic(llvm::Intrinsic::instrprof_mcdc_parameters), Args);
}
+/// Fill mcdc.addr order by ID.
+std::vector
+CodeGenPGO::getMCDCCondBitmapAddrArray(CGBuilderTy &Builder) {
+ std
@@ -1245,9 +1245,29 @@ void CodeGenPGO::emitMCDCParameters(CGBuilderTy
&Builder) {
CGM.getIntrinsic(llvm::Intrinsic::instrprof_mcdc_parameters), Args);
}
+/// Fill mcdc.addr order by ID.
+std::vector
+CodeGenPGO::getMCDCCondBitmapAddrArray(CGBuilderTy &Builder) {
+ std
@@ -1627,14 +1627,31 @@ class CodeGenFunction : public CodeGenTypeCache {
}
void markStmtMaybeUsed(const Stmt *S) { PGO.markStmtMaybeUsed(S); }
+ enum CounterForIncrement {
ornata wrote:
doxygen comment would be useful here
https://github.com/llvm/llvm-
@@ -1627,14 +1627,31 @@ class CodeGenFunction : public CodeGenTypeCache {
}
void markStmtMaybeUsed(const Stmt *S) { PGO.markStmtMaybeUsed(S); }
+ enum CounterForIncrement {
ornata wrote:
is the meaning of "exec counter" and "skip counter" defined anywher
@@ -884,6 +884,9 @@ struct CounterCoverageMappingBuilder
/// The map of statements to count values.
llvm::DenseMap &CounterMap;
+ CounterExpressionBuilder::SubstMap MapToExpand;
ornata wrote:
MapToExpand could use a doxygen comment explaining what it is
@@ -1432,6 +1434,8 @@ CoverageData
CoverageMapping::getCoverageForFile(StringRef Filename) const {
getImpreciseRecordIndicesForFilename(Filename);
for (unsigned RecordIndex : RecordIndices) {
const FunctionRecord &Function = Functions[RecordIndex];
+if (Filtere
ornata wrote:
>"Merge" facilities with std::max are removed as well for now.
why?
https://github.com/llvm/llvm-project/pull/121192
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/l
@@ -23,6 +23,16 @@ using namespace llvm;
namespace {
+template
+bool IsSummaryEmpty(const SummaryTy &Report, const CoverageViewOptions &Opts) {
ornata wrote:
case should be `isSummaryEmpty`
https://github.com/llvm/llvm-project/pull/121192
_
@@ -23,6 +23,16 @@ using namespace llvm;
namespace {
+template
+bool IsSummaryEmpty(const SummaryTy &Report, const CoverageViewOptions &Opts) {
ornata wrote:
function name case should be `isSummaryEmpty`
https://github.com/llvm/llvm-project/pull/121192
___
@@ -1400,14 +1375,12 @@ CodeGenFunction::EmitCXXForRangeStmt(const
CXXForRangeStmt &S,
if (ExitBlock != LoopExit.getBlock()) {
EmitBlock(ExitBlock);
+incrementProfileCounter(true, &S);
ornata wrote:
comment on boolean parameter for readability?
e.
ornata wrote:
Other than a couple nits on comments this looks fine to me.
https://github.com/llvm/llvm-project/pull/113111
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bran
@@ -915,10 +914,7 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) {
// Emit the 'then' code.
EmitBlock(ThenBlock);
- if (llvm::EnableSingleByteCoverage)
-incrementProfileCounter(S.getThen());
- else
-incrementProfileCounter(&S);
+ incrementProfileCounter(fa
@@ -864,8 +864,7 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) {
// If the skipped block has no labels in it, just emit the executed block.
// This avoids emitting dead code and simplifies the CFG substantially.
if (S.isConstexpr() || !ContainsLabel(Skipped))
@@ -940,15 +939,35 @@ struct CounterCoverageMappingBuilder
std::pair getBranchCounterPair(const Stmt *S,
Counter ParentCnt) {
-Counter ExecCnt = getRegionCounter(S);
-return {ExecCnt, Builder.subtract(ParentCnt, Exec
@@ -1632,11 +1632,17 @@ class CodeGenFunction : public CodeGenTypeCache {
/// Increment the profiler's counter for the given statement by \p StepV.
/// If \p StepV is null, the default increment is 1.
void incrementProfileCounter(const Stmt *S, llvm::Value *StepV = nullpt
https://github.com/ornata approved this pull request.
I think at this point this looks fine? @ellishg ?
https://github.com/llvm/llvm-project/pull/110966
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-
@@ -887,6 +887,9 @@ struct CounterCoverageMappingBuilder
/// The map of statements to count values.
llvm::DenseMap &CounterMap;
+ CounterExpressionBuilder::ReplaceMap MapToExpand;
+ unsigned NextCounterNum;
ornata wrote:
OK
https://github.com/llvm/llvm
@@ -638,6 +638,10 @@ static unsigned getMaxCounterID(const
CounterMappingContext &Ctx,
unsigned MaxCounterID = 0;
for (const auto &Region : Record.MappingRegions) {
MaxCounterID = std::max(MaxCounterID, Ctx.getMaxCounterID(Region.Count));
+if (Region.Kind == Counte
@@ -638,6 +638,10 @@ static unsigned getMaxCounterID(const
CounterMappingContext &Ctx,
unsigned MaxCounterID = 0;
for (const auto &Region : Record.MappingRegions) {
MaxCounterID = std::max(MaxCounterID, Ctx.getMaxCounterID(Region.Count));
+if (Region.Kind == Counte
@@ -638,6 +638,10 @@ static unsigned getMaxCounterID(const
CounterMappingContext &Ctx,
unsigned MaxCounterID = 0;
for (const auto &Region : Record.MappingRegions) {
MaxCounterID = std::max(MaxCounterID, Ctx.getMaxCounterID(Region.Count));
+if (Region.Kind == Counte
@@ -943,19 +942,43 @@ struct CounterCoverageMappingBuilder
std::pair getBranchCounterPair(const Stmt *S,
Counter ParentCnt) {
-Counter ExecCnt = getRegionCounter(S);
-return {ExecCnt, Builder.subtract(ParentCnt, Exec
@@ -887,6 +887,9 @@ struct CounterCoverageMappingBuilder
/// The map of statements to count values.
llvm::DenseMap &CounterMap;
+ CounterExpressionBuilder::ReplaceMap MapToExpand;
+ unsigned NextCounterNum;
ornata wrote:
Explicitly initialize to 0?
htt
@@ -112,6 +112,7 @@ class CodeGenPGO {
public:
std::pair getIsCounterPair(const Stmt *S) const;
ornata wrote:
I think this function could use some documentation, or a better name.
This can happen in a later commit.
https://github.com/llvm/llvm-project/pull/
@@ -1193,11 +1206,26 @@ std::pair
CodeGenPGO::getIsCounterPair(const Stmt *S) const {
}
void CodeGenPGO::emitCounterSetOrIncrement(CGBuilderTy &Builder, const Stmt *S,
+ bool UseSkipPath, bool UseBoth,
@@ -1193,11 +1206,26 @@ std::pair
CodeGenPGO::getIsCounterPair(const Stmt *S) const {
}
void CodeGenPGO::emitCounterSetOrIncrement(CGBuilderTy &Builder, const Stmt *S,
+ bool UseSkipPath, bool UseBoth,
@@ -1193,11 +1206,26 @@ std::pair
CodeGenPGO::getIsCounterPair(const Stmt *S) const {
}
void CodeGenPGO::emitCounterSetOrIncrement(CGBuilderTy &Builder, const Stmt *S,
+ bool UseSkipPath, bool UseBoth,
ornata wrote:
@chapuni is there an example of a broken modules build you can use to back this
up?
the commit is NFC and passes all PR tests, so this seems generally low-risk to
me.
https://github.com/llvm/llvm-project/pull/101102
___
llvm-branch-com
ornata wrote:
IIUC
- Scope: Programs built with MC/DC coverage with continuous mode enabled.
- Risk: This is a new feature for MC/DC coverage. Previously, MC/DC had no
support for continuous mode. There should be no breakage introduced for
existing features.
- Testing: LLVM lit tests attached.
Author: Jessica Paquette
Date: 2021-01-19T10:38:04-08:00
New Revision: cbf52463599c860243d29877021fcdfcd9d46553
URL:
https://github.com/llvm/llvm-project/commit/cbf52463599c860243d29877021fcdfcd9d46553
DIFF:
https://github.com/llvm/llvm-project/commit/cbf52463599c860243d29877021fcdfcd9d46553.di
Author: Jessica Paquette
Date: 2021-01-19T10:24:27-08:00
New Revision: cfc60730179042a93cb9cb338982e71d20707a24
URL:
https://github.com/llvm/llvm-project/commit/cfc60730179042a93cb9cb338982e71d20707a24
DIFF:
https://github.com/llvm/llvm-project/commit/cfc60730179042a93cb9cb338982e71d20707a24.di
Author: Jessica Paquette
Date: 2021-01-15T10:18:46-08:00
New Revision: cc90d41945f6c72d92fbbc6e7b38ceff6e7e1e93
URL:
https://github.com/llvm/llvm-project/commit/cc90d41945f6c72d92fbbc6e7b38ceff6e7e1e93
DIFF:
https://github.com/llvm/llvm-project/commit/cc90d41945f6c72d92fbbc6e7b38ceff6e7e1e93.di
Author: Jessica Paquette
Date: 2021-01-12T15:21:19-08:00
New Revision: ddcb0aae8b0dd87414105d264d1ee9eac9567476
URL:
https://github.com/llvm/llvm-project/commit/ddcb0aae8b0dd87414105d264d1ee9eac9567476
DIFF:
https://github.com/llvm/llvm-project/commit/ddcb0aae8b0dd87414105d264d1ee9eac9567476.di
Author: Jessica Paquette
Date: 2020-12-08T14:17:26-08:00
New Revision: 40d1fb22293ba6409e802489ff106bbc95918565
URL:
https://github.com/llvm/llvm-project/commit/40d1fb22293ba6409e802489ff106bbc95918565
DIFF:
https://github.com/llvm/llvm-project/commit/40d1fb22293ba6409e802489ff106bbc95918565.di
Author: Jessica Paquette
Date: 2020-12-08T13:47:08-08:00
New Revision: 21308c2b4c9dda8d44d2792f1359fc6b54984b87
URL:
https://github.com/llvm/llvm-project/commit/21308c2b4c9dda8d44d2792f1359fc6b54984b87
DIFF:
https://github.com/llvm/llvm-project/commit/21308c2b4c9dda8d44d2792f1359fc6b54984b87.di
Author: Jessica Paquette
Date: 2020-12-08T10:53:37-08:00
New Revision: 5b5d3fa9d9cf9e0b8904de0dc9ea5248f6a37ed1
URL:
https://github.com/llvm/llvm-project/commit/5b5d3fa9d9cf9e0b8904de0dc9ea5248f6a37ed1
DIFF:
https://github.com/llvm/llvm-project/commit/5b5d3fa9d9cf9e0b8904de0dc9ea5248f6a37ed1.di
Author: Jessica Paquette
Date: 2020-12-08T10:42:59-08:00
New Revision: cd9a52b99e685e8a77dd85d25c7d1ec8b86b9f55
URL:
https://github.com/llvm/llvm-project/commit/cd9a52b99e685e8a77dd85d25c7d1ec8b86b9f55
DIFF:
https://github.com/llvm/llvm-project/commit/cd9a52b99e685e8a77dd85d25c7d1ec8b86b9f55.di
Author: Jessica Paquette
Date: 2020-12-08T10:42:05-08:00
New Revision: ce199667f65bcddc31c8c4be2b723f9132815fe6
URL:
https://github.com/llvm/llvm-project/commit/ce199667f65bcddc31c8c4be2b723f9132815fe6
DIFF:
https://github.com/llvm/llvm-project/commit/ce199667f65bcddc31c8c4be2b723f9132815fe6.di
Author: Jessica Paquette
Date: 2020-12-08T09:18:28-08:00
New Revision: b15491eb333809e907e51d1b05da2a6a6344a427
URL:
https://github.com/llvm/llvm-project/commit/b15491eb333809e907e51d1b05da2a6a6344a427
DIFF:
https://github.com/llvm/llvm-project/commit/b15491eb333809e907e51d1b05da2a6a6344a427.di
Author: Jessica Paquette
Date: 2020-12-07T17:24:23-08:00
New Revision: d49f6491b6d1439b5a65ff6e965b65a66d943b63
URL:
https://github.com/llvm/llvm-project/commit/d49f6491b6d1439b5a65ff6e965b65a66d943b63
DIFF:
https://github.com/llvm/llvm-project/commit/d49f6491b6d1439b5a65ff6e965b65a66d943b63.di
Author: Jessica Paquette
Date: 2020-12-07T15:04:33-08:00
New Revision: 195a7af0abb26915f962462f69c0f17e3835f78b
URL:
https://github.com/llvm/llvm-project/commit/195a7af0abb26915f962462f69c0f17e3835f78b
DIFF:
https://github.com/llvm/llvm-project/commit/195a7af0abb26915f962462f69c0f17e3835f78b.di
Author: Jessica Paquette
Date: 2020-12-01T16:57:46-08:00
New Revision: b6b0a80eb93cf1547974e610d5fac261764570f5
URL:
https://github.com/llvm/llvm-project/commit/b6b0a80eb93cf1547974e610d5fac261764570f5
DIFF:
https://github.com/llvm/llvm-project/commit/b6b0a80eb93cf1547974e610d5fac261764570f5.di
Author: Jessica Paquette
Date: 2020-12-01T16:45:37-08:00
New Revision: c82f002cea304be505f14af70dce25ad149ba29f
URL:
https://github.com/llvm/llvm-project/commit/c82f002cea304be505f14af70dce25ad149ba29f
DIFF:
https://github.com/llvm/llvm-project/commit/c82f002cea304be505f14af70dce25ad149ba29f.di
Author: Jessica Paquette
Date: 2020-12-01T15:45:14-08:00
New Revision: 6c3fa97d8a628541c82d8981aabefcb2dcb29f17
URL:
https://github.com/llvm/llvm-project/commit/6c3fa97d8a628541c82d8981aabefcb2dcb29f17
DIFF:
https://github.com/llvm/llvm-project/commit/6c3fa97d8a628541c82d8981aabefcb2dcb29f17.di
45 matches
Mail list logo