[clang] [llvm] [Coverage] Make additional counters available for BranchRegion. NFC. (PR #120930)

2025-01-09 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/120930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2025-01-09 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/112724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/112724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/112724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/112702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/112702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 24a92f5 - DependencyScanningTool.h: Use more robust `std::function` (fixup for #120699)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2025-01-09T15:52:21+09:00 New Revision: 24a92f509a4e9ebaf5ae431409520d30055ea6fc URL: https://github.com/llvm/llvm-project/commit/24a92f509a4e9ebaf5ae431409520d30055ea6fc DIFF: https://github.com/llvm/llvm-project/commit/24a92f509a4e9ebaf5ae431409520d30055ea6fc.dif

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/112702 >From fc697f04fd6c9f3c217ce04e3f1dd082c1f1a705 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 16 Oct 2024 23:16:53 +0900 Subject: [PATCH 01/12] [Coverage] Introduce `getBranchCounterPair()`. NFC. Thi

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
@@ -939,8 +939,17 @@ struct CounterCoverageMappingBuilder Counter Skipped; }; - BranchCounterPair getBranchCounterPair(const Stmt *S, Counter ParentCnt) { + BranchCounterPair + getBranchCounterPair(const Stmt *S, Counter ParentCnt, + std::optiona

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
@@ -938,6 +938,37 @@ struct CounterCoverageMappingBuilder return Counter::getCounter(CounterMap[S]); } + struct BranchCounterPair { +Counter Executed; +Counter Skipped; + }; + + BranchCounterPair getBranchCounterPair(const Stmt *S, Counter ParentCnt) { ---

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
@@ -939,8 +939,17 @@ struct CounterCoverageMappingBuilder Counter Skipped; }; - BranchCounterPair getBranchCounterPair(const Stmt *S, Counter ParentCnt) { + BranchCounterPair + getBranchCounterPair(const Stmt *S, Counter ParentCnt, + std::optiona

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
@@ -939,8 +939,17 @@ struct CounterCoverageMappingBuilder Counter Skipped; }; - BranchCounterPair getBranchCounterPair(const Stmt *S, Counter ParentCnt) { + BranchCounterPair + getBranchCounterPair(const Stmt *S, Counter ParentCnt, + std::optiona

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/112702 >From fc697f04fd6c9f3c217ce04e3f1dd082c1f1a705 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 16 Oct 2024 23:16:53 +0900 Subject: [PATCH 01/11] [Coverage] Introduce `getBranchCounterPair()`. NFC. Thi

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-08 Thread NAKAMURA Takumi via cfe-commits
@@ -938,6 +938,37 @@ struct CounterCoverageMappingBuilder return Counter::getCounter(CounterMap[S]); } + struct BranchCounterPair { chapuni wrote: `BranchCounterPair` is a local type and only `getBranchCounterPair()` emits it for now. I think it'd be

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-07 Thread NAKAMURA Takumi via cfe-commits
@@ -939,8 +939,17 @@ struct CounterCoverageMappingBuilder Counter Skipped; }; - BranchCounterPair getBranchCounterPair(const Stmt *S, Counter ParentCnt) { + BranchCounterPair + getBranchCounterPair(const Stmt *S, Counter ParentCnt, + std::optiona

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-07 Thread NAKAMURA Takumi via cfe-commits
@@ -938,6 +938,37 @@ struct CounterCoverageMappingBuilder return Counter::getCounter(CounterMap[S]); } + struct BranchCounterPair { +Counter Executed; +Counter Skipped; + }; + + BranchCounterPair getBranchCounterPair(const Stmt *S, Counter ParentCnt) { +Co

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-07 Thread NAKAMURA Takumi via cfe-commits
@@ -1592,6 +1605,13 @@ struct CounterCoverageMappingBuilder llvm::EnableSingleByteCoverage ? getRegionCounter(S->getCond()) : addCounters(ParentCount, BackedgeCount, BC.ContinueCount); +auto [ExecCount, ExitCount] = +(llvm::EnableSing

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-07 Thread NAKAMURA Takumi via cfe-commits
@@ -939,8 +939,17 @@ struct CounterCoverageMappingBuilder Counter Skipped; }; - BranchCounterPair getBranchCounterPair(const Stmt *S, Counter ParentCnt) { + BranchCounterPair + getBranchCounterPair(const Stmt *S, Counter ParentCnt, + std::optiona

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-07 Thread NAKAMURA Takumi via cfe-commits
@@ -938,6 +938,37 @@ struct CounterCoverageMappingBuilder return Counter::getCounter(CounterMap[S]); } + struct BranchCounterPair { chapuni wrote: I wrote similar comments (from codegen side) in #112724 and I wanted to leave this side self-descriptive

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-07 Thread NAKAMURA Takumi via cfe-commits
@@ -939,8 +939,17 @@ struct CounterCoverageMappingBuilder Counter Skipped; }; - BranchCounterPair getBranchCounterPair(const Stmt *S, Counter ParentCnt) { + BranchCounterPair + getBranchCounterPair(const Stmt *S, Counter ParentCnt, + std::optiona

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-07 Thread NAKAMURA Takumi via cfe-commits
@@ -938,6 +938,37 @@ struct CounterCoverageMappingBuilder return Counter::getCounter(CounterMap[S]); } + struct BranchCounterPair { +Counter Executed; chapuni wrote: I still wonder which pair of names would fit best. I adopted "Exec" from `BinOp`

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-07 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/112702 >From fc697f04fd6c9f3c217ce04e3f1dd082c1f1a705 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 16 Oct 2024 23:16:53 +0900 Subject: [PATCH 1/9] [Coverage] Introduce `getBranchCounterPair()`. NFC. This

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2025-01-05 Thread NAKAMURA Takumi via cfe-commits
@@ -941,6 +941,19 @@ struct CounterCoverageMappingBuilder return Counter::getCounter(CounterMap[S]); } + std::pair getBranchCounterPair(const Stmt *S, chapuni wrote: Done but I am still dubious namings would be appropriate. Not all users expect `[Exec

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2025-01-05 Thread NAKAMURA Takumi via cfe-commits
@@ -122,6 +123,18 @@ class CodeGenPGO { Address MCDCCondBitmapAddr, llvm::Value *Val, CodeGenFunction &CGF); + void markStmtAsUsed(bool Skipped, const Stmt *S) { +// Do nothing. + } + + void markStmtMaybeUs

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2025-01-05 Thread NAKAMURA Takumi via cfe-commits
@@ -101,6 +101,25 @@ enum ForDefinition_t : bool { ForDefinition = true }; +class CounterPair : public std::pair { chapuni wrote: Added comments, and refactored more. - Introduce the subclass `ValueOpt` and move mask operations into it. - Name the pair as `

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2025-01-05 Thread NAKAMURA Takumi via cfe-commits
@@ -1869,7 +1871,10 @@ void CodeGenFunction::EmitAutoVarInit(const AutoVarEmission &emission) { // If we are at an unreachable point, we don't need to emit the initializer // unless it contains a label. if (!HaveInsertPoint()) { -if (!Init || !ContainsLabel(Init)) re

[clang] [compiler-rt] [llvm] LLVMCoverage: Unify getCoverageForFile and getCoverageForFunction. NFC (PR #120842)

2025-01-05 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/120842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-28 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: Excuse me, I've reverted this. https://github.com/llvm/llvm-project/pull/120087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 537d4e9 - Revert "Added options to readability-implicit-bool-conversion (#120087)"

2024-12-28 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-12-28T17:47:00+09:00 New Revision: 537d4e9d21be1f5e40a780f570663b04572765af URL: https://github.com/llvm/llvm-project/commit/537d4e9d21be1f5e40a780f570663b04572765af DIFF: https://github.com/llvm/llvm-project/commit/537d4e9d21be1f5e40a780f570663b04572765af.dif

[clang] 811e1f4 - clang/test/CoverageMapping/single-byte-counters.cpp: Align to the final form to fill linefeeds.

2024-12-28 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-12-28T17:47:09+09:00 New Revision: 811e1f4661bca4a2b5c93d30f54c3aa338f175e9 URL: https://github.com/llvm/llvm-project/commit/811e1f4661bca4a2b5c93d30f54c3aa338f175e9 DIFF: https://github.com/llvm/llvm-project/commit/811e1f4661bca4a2b5c93d30f54c3aa338f175e9.dif

[clang] [compiler-rt] [llvm] [Coverage] Move SingleByteCoverage out of CountedRegion (PR #110966)

2024-12-27 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/110966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [Coverage] Move SingleByteCoverage out of CountedRegion (PR #110966)

2024-12-27 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/110966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2024-12-23 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/112724 >From e4172ca273a6fdfcbfc4662c9e37276ef34c2df4 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 17 Oct 2024 00:32:26 +0900 Subject: [PATCH 1/5] Introduce the type `CounterPair` for RegionCounterMap `Co

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2024-12-23 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/112702 >From fc697f04fd6c9f3c217ce04e3f1dd082c1f1a705 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 16 Oct 2024 23:16:53 +0900 Subject: [PATCH 1/5] [Coverage] Introduce `getBranchCounterPair()`. NFC. This

[clang] [compiler-rt] [llvm] [Coverage][Single] Round Counters to boolean after evaluation (PR #110972)

2024-12-23 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/110972 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [Coverage][Single] Round Counters to boolean after evaluation (PR #110972)

2024-12-23 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/110972 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Introduce SingleByteCoverage tests (w/yaml2obj) (PR #113114)

2024-12-23 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/113114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Introduce SingleByteCoverage tests (w/yaml2obj) (PR #113114)

2024-12-22 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @ornata Thanks. I'll merge this possibly tomorrow unless objections. https://github.com/llvm/llvm-project/pull/113114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] Single byte coverage with branch coverage (PR #113115)

2024-12-22 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/113115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] Single byte coverage with branch coverage (PR #113115)

2024-12-21 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/113115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] Single byte coverage with branch coverage (PR #113115)

2024-12-21 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/113115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2024-12-21 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/112702 >From fc697f04fd6c9f3c217ce04e3f1dd082c1f1a705 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 16 Oct 2024 23:16:53 +0900 Subject: [PATCH 1/4] [Coverage] Introduce `getBranchCounterPair()`. NFC. This

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2024-12-21 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/112724 >From e4172ca273a6fdfcbfc4662c9e37276ef34c2df4 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 17 Oct 2024 00:32:26 +0900 Subject: [PATCH 1/3] Introduce the type `CounterPair` for RegionCounterMap `Co

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2024-12-19 Thread NAKAMURA Takumi via cfe-commits
@@ -1869,7 +1871,10 @@ void CodeGenFunction::EmitAutoVarInit(const AutoVarEmission &emission) { // If we are at an unreachable point, we don't need to emit the initializer // unless it contains a label. if (!HaveInsertPoint()) { -if (!Init || !ContainsLabel(Init)) re

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2024-12-19 Thread NAKAMURA Takumi via cfe-commits
@@ -362,6 +362,8 @@ CodeGenFunction::AddInitializerToStaticVarDecl(const VarDecl &D, return GV; } + PGO.markStmtMaybeUsed(D.getInit()); // FIXME: Too lazy chapuni wrote: It marks entire the initializer as "don't check further". Just for checks and wi

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2024-12-19 Thread NAKAMURA Takumi via cfe-commits
@@ -1728,6 +1730,7 @@ bool CodeGenFunction::ConstantFoldsToSimpleInteger(const Expr *Cond, if (!AllowLabels && CodeGenFunction::ContainsLabel(Cond)) return false; // Contains a label. + PGO.markStmtMaybeUsed(Cond); chapuni wrote: No. Just for checks.

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2024-12-19 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni commented: `mark` stuffs are just for checking. I thought it better to put stubs of checkers in this change, rather than introducing them when I introduce the body of `verify`. https://github.com/llvm/llvm-project/pull/112724 _

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2024-12-19 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/112724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2024-12-19 Thread NAKAMURA Takumi via cfe-commits
@@ -2221,27 +2249,27 @@ struct CounterCoverageMappingBuilder extendRegion(E->getRHS()); propagateCounts(getRegionCounter(E), E->getRHS()); +if (llvm::EnableSingleByteCoverage) chapuni wrote: This is a small refactor for below and this itself will

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2024-12-19 Thread NAKAMURA Takumi via cfe-commits
@@ -1592,6 +1605,13 @@ struct CounterCoverageMappingBuilder llvm::EnableSingleByteCoverage ? getRegionCounter(S->getCond()) : addCounters(ParentCount, BackedgeCount, BC.ContinueCount); +auto [ExecCount, ExitCount] = +(llvm::EnableSing

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2024-12-19 Thread NAKAMURA Takumi via cfe-commits
@@ -941,6 +941,19 @@ struct CounterCoverageMappingBuilder return Counter::getCounter(CounterMap[S]); } + std::pair getBranchCounterPair(const Stmt *S, + Counter ParentCnt) { +Counter ExecCnt = getRegionCounter(S); +

[clang] [Coverage] Resurrect Branch:FalseCnt in SwitchStmt that was pruned in #112694 (PR #120418)

2024-12-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/120418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Resurrect Branch:FalseCnt in SwitchStmt that was pruned in #112694 (PR #120418)

2024-12-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/120418 I missed that FalseCnt for each Case was used to calculate percentage in the SwitchStmt. At the moment I resurrect them. In `!HasDefaultCase`, the pair of Counters shall be `[CaseCountSum, FalseCnt]`. (Revers

[clang] 5a5838f - Introduce CounterMappingRegion::isBranch(). NFC.

2024-12-18 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-12-18T20:00:02+09:00 New Revision: 5a5838fba37153adb7885c897131dda09227eb2d URL: https://github.com/llvm/llvm-project/commit/5a5838fba37153adb7885c897131dda09227eb2d DIFF: https://github.com/llvm/llvm-project/commit/5a5838fba37153adb7885c897131dda09227eb2d.dif

[clang] [llvm] Introduce SingleByteCoverage tests (w/yaml2obj) (PR #113114)

2024-12-09 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: Ping. Or would it be too early for adopting yaml2obj? https://github.com/llvm/llvm-project/pull/113114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] Single byte coverage with branch coverage (PR #113115)

2024-11-21 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/113115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] Single byte coverage with branch coverage (PR #113115)

2024-11-21 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/113115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Introduce SingleByteCoverage tests (w/yaml2obj) (PR #113114)

2024-11-21 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/113114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Introduce SingleByteCoverage tests (w/yaml2obj) (PR #113114)

2024-11-21 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/113114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Introduce SingleByteCoverage tests (w/yaml2obj) (PR #113114)

2024-11-20 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/113114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5ff5243 - Relax clang/test/CodeGen/tbaa-pointers.c for -Asserts.

2024-11-18 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-11-18T15:27:49+09:00 New Revision: 5ff52436fd0c7739765f1d849992713a3e9ae237 URL: https://github.com/llvm/llvm-project/commit/5ff52436fd0c7739765f1d849992713a3e9ae237 DIFF: https://github.com/llvm/llvm-project/commit/5ff52436fd0c7739765f1d849992713a3e9ae237.dif

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2024-10-27 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/112702 >From fc697f04fd6c9f3c217ce04e3f1dd082c1f1a705 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 16 Oct 2024 23:16:53 +0900 Subject: [PATCH 1/3] [Coverage] Introduce `getBranchCounterPair()`. NFC. This

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2024-10-24 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @ornata I put #113115 as the final form. HTH https://github.com/llvm/llvm-project/pull/112702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2024-10-24 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/112724 >From e4172ca273a6fdfcbfc4662c9e37276ef34c2df4 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 17 Oct 2024 00:32:26 +0900 Subject: [PATCH 1/3] Introduce the type `CounterPair` for RegionCounterMap `Co

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-23 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @Lambdaris I have #112730 as well. https://github.com/llvm/llvm-project/pull/112694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang/test/CoverageMapping/single-byte-counters.cpp: Rewrite counters with matches (PR #113114)

2024-10-20 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: I think I could dissolve `single-byte-counters.cpp` to other tests. Let me rework. https://github.com/llvm/llvm-project/pull/113114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] clang/test/CoverageMapping/single-byte-counters.cpp: Rewrite counters with matches (PR #113114)

2024-10-20 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/113114 None >From 52f072e5058267660aa8c8fbb00c5d09634f22b3 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Fri, 18 Oct 2024 08:32:39 +0900 Subject: [PATCH] clang/test/CoverageMapping/single-byte-counters.cpp: Rew

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-19 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/112694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-19 Thread NAKAMURA Takumi via cfe-commits
@@ -125,7 +125,7 @@ json::Array renderRegions(ArrayRef Regions) { json::Array renderBranchRegions(ArrayRef Regions) { json::Array RegionArray; for (const auto &Region : Regions) -if (!Region.Folded) +if (!Region.TrueFolded || !Region.FalseFolded) c

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-19 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/112694 >From ea3e2df8c712ae5da77e55a14e97b1b6855a6b76 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 6 Oct 2024 10:11:54 +0900 Subject: [PATCH 1/2] [Coverage] Introduce "partial fold" on BranchRegion Curren

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-18 Thread NAKAMURA Takumi via cfe-commits
@@ -19,18 +19,18 @@ using namespace coverage; static void sumBranches(size_t &NumBranches, size_t &CoveredBranches, const ArrayRef &Branches) { for (const auto &BR : Branches) { -// Skip folded branches. -if (BR.Folded) - continue; - -

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-18 Thread NAKAMURA Takumi via cfe-commits
@@ -719,10 +720,10 @@ struct FunctionRecord { Region.Kind == CounterMappingRegion::MCDCBranchRegion) { CountedBranchRegions.emplace_back(Region, Count, FalseCount, HasSingleByteCoverage); - // If both counters are hard-

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni commented: Thanks for comments! https://github.com/llvm/llvm-project/pull/112694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-18 Thread NAKAMURA Takumi via cfe-commits
@@ -19,18 +19,18 @@ using namespace coverage; static void sumBranches(size_t &NumBranches, size_t &CoveredBranches, const ArrayRef &Branches) { for (const auto &BR : Branches) { -// Skip folded branches. -if (BR.Folded) - continue; - -

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-18 Thread NAKAMURA Takumi via cfe-commits
@@ -125,7 +125,7 @@ json::Array renderRegions(ArrayRef Regions) { json::Array renderBranchRegions(ArrayRef Regions) { json::Array RegionArray; for (const auto &Region : Regions) -if (!Region.Folded) +if (!Region.TrueFolded || !Region.FalseFolded) c

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/112694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2024-10-17 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/112702 >From fc697f04fd6c9f3c217ce04e3f1dd082c1f1a705 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 16 Oct 2024 23:16:53 +0900 Subject: [PATCH 1/2] [Coverage] Introduce `getBranchCounterPair()`. NFC. This

[clang] [Coverage] Introduce the type `CounterPair` for RegionCounterMap. NFC. (PR #112724)

2024-10-17 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/112724 `CounterPair` can hold `` instead of current `unsigned`, to hold also the counter number of SkipPath. For now, this change provides the skeleton and only `CounterPair::first` is used. Each counter number can h

[clang] [Coverage] Introduce `getBranchCounterPair()`. NFC. (PR #112702)

2024-10-17 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/112702 This aggregates the generation of branch counter pair as `ExecCnt` and `SkipCnt`, to aggregate `CounterExpr::subtract`. At the moment: - This change preserves the behavior of `llvm::EnableSingleByteCoverage`.

[clang] [llvm] [Coverage] Introduce "partial fold" on BranchRegion (PR #112694)

2024-10-17 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/112694 Currently both True/False counts were folded. It lost the information, "It is True or False before folding." It prevented recalling branch counts in merging template instantiations. In `llvm-cov`, a folded bra

[clang] 5bcc66d - VisitIfStmt: Prune a redundant condition.

2024-10-17 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-10-17T20:04:00+09:00 New Revision: 5bcc66dc009893c55aefdcd16a0ca2dad315481b URL: https://github.com/llvm/llvm-project/commit/5bcc66dc009893c55aefdcd16a0ca2dad315481b DIFF: https://github.com/llvm/llvm-project/commit/5bcc66dc009893c55aefdcd16a0ca2dad315481b.dif

[clang] 1cc3ffa - clangCodeGen: Reformat and refactor. NFC.

2024-10-03 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-10-03T17:56:19+09:00 New Revision: 1cc3ffab4076ad727a2346b17b34486d848da9f6 URL: https://github.com/llvm/llvm-project/commit/1cc3ffab4076ad727a2346b17b34486d848da9f6 DIFF: https://github.com/llvm/llvm-project/commit/1cc3ffab4076ad727a2346b17b34486d848da9f6.dif

[clang] [compiler-rt] [UBSan] Diagnose assumption violation (PR #104741)

2024-09-25 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: This has triggered a failure in our private builder (aarch64-ubuntu20.04) ``` TEST 'libFuzzer-aarch64-default-Linux :: strncmp.test' FAILED Exit Code: 1 Command Output (stderr): -- RUN: at line 2: /home/bb/clang-aarch64/build/2/./bin/clan

[clang] [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #102848)

2024-08-15 Thread NAKAMURA Takumi via cfe-commits
@@ -2900,17 +2958,51 @@ void MicrosoftCXXNameMangler::mangleFunctionType(const FunctionType *T, // can differ by their calling convention and are typically deduced. So // we make sure that this type gets mangled properly. mangleType(ResultType, Range, QMM_Re

[clang] [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #102848)

2024-08-15 Thread NAKAMURA Takumi via cfe-commits
@@ -2900,17 +2958,51 @@ void MicrosoftCXXNameMangler::mangleFunctionType(const FunctionType *T, // can differ by their calling convention and are typically deduced. So // we make sure that this type gets mangled properly. mangleType(ResultType, Range, QMM_Re

[clang] [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #102848)

2024-08-15 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni commented: Fixed in fa343be414f9364911b947f109f3df5539e23068. https://github.com/llvm/llvm-project/pull/102848 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #102848)

2024-08-15 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/102848 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fa343be - Fix warnings in #102848 [-Wunused-but-set-variable]

2024-08-15 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-08-15T16:12:05+09:00 New Revision: fa343be414f9364911b947f109f3df5539e23068 URL: https://github.com/llvm/llvm-project/commit/fa343be414f9364911b947f109f3df5539e23068 DIFF: https://github.com/llvm/llvm-project/commit/fa343be414f9364911b947f109f3df5539e23068.dif

[clang] [Coverage] Suppress covmap and profdata for system headers. (PR #97952)

2024-07-10 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/97952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Implement resolution for CWG1835 (PR #92957)

2024-07-09 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: Reverted, thank you. https://github.com/llvm/llvm-project/pull/92957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Suppress covmap and profdata for system headers. (PR #97952)

2024-07-09 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/97952 >From 0d87f3b0be84230e40025f221c501f9104fdc261 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 7 Jul 2024 22:48:20 +0900 Subject: [PATCH 1/3] Update clang/test/system_macro.cpp for both -system-headers

[clang] 4801757 - Move `SystemHeadersCoverage` into `llvm::coverage` in CoverageMappingGen.h

2024-07-09 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-07-09T22:21:20+09:00 New Revision: 48017579e523085bc3ee99004c36526333a3c8b3 URL: https://github.com/llvm/llvm-project/commit/48017579e523085bc3ee99004c36526333a3c8b3 DIFF: https://github.com/llvm/llvm-project/commit/48017579e523085bc3ee99004c36526333a3c8b3.dif

[clang] 3029378 - Update clang/test/system_macro.cpp for both -system-headers-coverage=true/false

2024-07-09 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-07-09T22:21:20+09:00 New Revision: 302937859fce0bb506ef6edf9c3e77c86ab44b86 URL: https://github.com/llvm/llvm-project/commit/302937859fce0bb506ef6edf9c3e77c86ab44b86 DIFF: https://github.com/llvm/llvm-project/commit/302937859fce0bb506ef6edf9c3e77c86ab44b86.dif

[clang] [Coverage] Suppress covmap and profdata for system headers. (PR #97952)

2024-07-07 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/97952 With `system-headers-coverage=false`, functions defined in system headers was not instrumented but corresponding covmap was emitted. It caused wasting covmap and profraw. This change improves: - Reduce object

[clang] 7ef2bd4 - Relax MC/DC tests

2024-06-18 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2024-06-19T15:41:59+09:00 New Revision: 7ef2bd4e447280015803cff7fc91ec4dd09cd4b3 URL: https://github.com/llvm/llvm-project/commit/7ef2bd4e447280015803cff7fc91ec4dd09cd4b3 DIFF: https://github.com/llvm/llvm-project/commit/7ef2bd4e447280015803cff7fc91ec4dd09cd4b3.dif

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/95887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/95887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/95887 >From defd3f6b694a5091da92d925738631b8359c43bb Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 18 Jun 2024 11:10:14 +0900 Subject: [PATCH 1/6] Update ReleaseNotes for MC/DC changes. --- clang/docs/Rel

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/95887 >From defd3f6b694a5091da92d925738631b8359c43bb Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 18 Jun 2024 11:10:14 +0900 Subject: [PATCH 1/5] Update ReleaseNotes for MC/DC changes. --- clang/docs/Rel

[clang] [llvm] Update ReleaseNotes for MC/DC changes. (PR #95887)

2024-06-18 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/95887 >From defd3f6b694a5091da92d925738631b8359c43bb Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 18 Jun 2024 11:10:14 +0900 Subject: [PATCH 1/4] Update ReleaseNotes for MC/DC changes. --- clang/docs/Rel

  1   2   3   4   5   6   7   >