[clang] 4088c70 - CGHLSLBuiltins.cpp: Suppress a warning in #131237 [-Wunused-variable]

2025-04-03 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2025-04-04T11:05:46+09:00 New Revision: 4088c70f4e7eae0bfc2916cc88c7301ec5e19daf URL: https://github.com/llvm/llvm-project/commit/4088c70f4e7eae0bfc2916cc88c7301ec5e19daf DIFF: https://github.com/llvm/llvm-project/commit/4088c70f4e7eae0bfc2916cc88c7301ec5e19daf.dif

[clang] [llvm] [MC/DC] Make covmap tolerant of nested Decisions (PR #125407)

2025-04-02 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: Refactored with expansion walker. https://github.com/llvm/llvm-project/pull/125407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coverage] Improve performance of propagating Counter of Expansions (PR #122589)

2025-04-02 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/122589 >From e5fbf846113591b0abff151d91b01a5dd40abef1 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sat, 11 Jan 2025 18:42:10 +0900 Subject: [PATCH 1/6] [Coverage] Improve performance of propagating Counter of

[clang] [llvm] [MC/DC] Make covmap tolerant of nested Decisions (PR #125407)

2025-04-02 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/125407 >From 06d0d51dce35916ebabcbb219c2d868df375e601 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 2 Feb 2025 21:58:41 +0900 Subject: [PATCH 1/2] [MC/DC] Make covmap tolerant of nested Decisions CoverageM

[clang] [compiler-rt] [llvm] llvm-cov: Merge records for template instantiations (PR #121197)

2025-03-13 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @evodius96 I think you would be the best person to review my remaining requests. https://github.com/llvm/llvm-project/pull/121197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [MC/DC] Update CoverageMapping tests (PR #125404)

2025-03-01 Thread NAKAMURA Takumi via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -fcoverage-mcdc -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only %s 2> %t.stderr.txt | FileCheck %s chapuni wrote: Nah, wrong. I've removed another.

[clang] [MC/DC] Refactor MCDC::State::Decision. NFC. (PR #125408)

2025-03-01 Thread NAKAMURA Takumi via cfe-commits
@@ -30,8 +32,20 @@ struct State { unsigned BitmapBits = 0; struct Decision { +using IndicesTy = llvm::SmallVector>; +static constexpr auto InvalidID = std::numeric_limits::max(); + unsigned BitmapIdx; -llvm::SmallVector> Indices; +IndicesTy Indices; +

[clang] [MC/DC] Refactor MCDC::State::Decision. NFC. (PR #125408)

2025-02-28 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/125408 >From a6d4be0e4b05b411c7160385485cfed0f173965c Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 2 Feb 2025 21:55:43 +0900 Subject: [PATCH 1/4] [MC/DC] Update CoverageMapping tests To resolve the error,

[clang] [MC/DC] Enable usage of `!` among `&&` and `||` (PR #125406)

2025-02-28 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/125406 >From a6d4be0e4b05b411c7160385485cfed0f173965c Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 2 Feb 2025 21:55:43 +0900 Subject: [PATCH 1/4] [MC/DC] Update CoverageMapping tests To resolve the error,

[clang] [MC/DC] Handle __builtin_expect as if parenthses (PR #125405)

2025-02-28 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/125405 >From a6d4be0e4b05b411c7160385485cfed0f173965c Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 2 Feb 2025 21:55:43 +0900 Subject: [PATCH 1/3] [MC/DC] Update CoverageMapping tests To resolve the error,

[clang] [MC/DC] Handle __builtin_expect as if parenthses (PR #125405)

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

[clang] [MC/DC] Enable usage of `!` among `&&` and `||` (PR #125406)

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

[clang] [MC/DC] Update CoverageMapping tests (PR #125404)

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

[clang] [MC/DC] Update CoverageMapping tests (PR #125404)

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

[clang] [MC/DC] Update CoverageMapping tests (PR #125404)

2025-02-28 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/125404 >From a6d4be0e4b05b411c7160385485cfed0f173965c Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 2 Feb 2025 21:55:43 +0900 Subject: [PATCH 1/2] [MC/DC] Update CoverageMapping tests To resolve the error,

[clang] [MC/DC] Refactor MCDC::State::Decision. NFC. (PR #125408)

2025-02-28 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/125408 >From d414f29ed8732c77fdcd05cc3b066e9ee0d9de07 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 2 Feb 2025 21:59:33 +0900 Subject: [PATCH 1/2] [MC/DC] Refactor MCDC::State::Decision. NFC. Introduce `ID

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

2025-02-13 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @kaddkaka IIRC the issue was "char is unsigned". It could be reproducible with adding default target as failing targets above. https://github.com/llvm/llvm-project/pull/120087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [llvm] [Coverage][MC/DC] Show uncoverable and unreachable conditions (PR #94137)

2025-02-11 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: What's the current status? I think marking extended semantics (to Regions) will still be the issue. Could we enhance "Gap"? https://github.com/llvm/llvm-project/pull/94137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [MC/DC] Update CoverageMapping tests (PR #125404)

2025-02-11 Thread NAKAMURA Takumi via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -fcoverage-mcdc -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only %s 2> %t.stderr.txt | FileCheck %s chapuni wrote: Note, this test will be withdrawn

[clang] [llvm] [MC/DC] Nested decision (PR #125403)

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

[clang] [llvm] [MC/DC] Nested decision (PR #125403)

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

[clang] [llvm] [MC/DC] Nested decision (PR #125403)

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

[clang] [MC/DC] Refactor MCDC::State::Decision. NFC. (PR #125408)

2025-02-02 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/125408 Introduce `ID` and `InvalidID`. Then `DecisionByStmt` can have three states. * Not assigned if the Stmt(Expr) doesn't exist. * When `DecisionByStmt[Expr]` exists: * Invalid and should be ignored if `ID == Inva

[clang] [llvm] [MC/DC] Make covmap tolerant of nested Decisions (PR #125407)

2025-02-02 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/125407 CoverageMappingWriter reorders `Region`s by `endLoc DESC` to prioritize wider `Decision` with the same `startLoc`. In `llvm-cov`, tweak seeking Decisions by reversal order to find smaller Decision first. >Fro

[clang] [MC/DC] Update CoverageMapping tests (PR #125404)

2025-02-02 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/125404 To resolve the error, rename mcdc-error-nests.cpp -> mcdc-nested-expr.cpp at first. - `func_condop` A corner case that contains close decisions. - `func_expect` Uses `__builtin_expect`. (#124565) - `func_lnot`

[clang] [llvm] [MC/DC] Nested decision (PR #125403)

2025-02-02 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/125403 None >From a6d4be0e4b05b411c7160385485cfed0f173965c Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sun, 2 Feb 2025 21:55:43 +0900 Subject: [PATCH 1/9] [MC/DC] Update CoverageMapping tests To resolve the

[clang] 7974f12 - [HLSL] Suppress a warning in #122820 [-Wunused-but-set-variable]

2025-01-25 Thread NAKAMURA Takumi via cfe-commits
Author: NAKAMURA Takumi Date: 2025-01-25T18:32:29+09:00 New Revision: 7974f12b1e3682514bd58b35c5a784f35938fa04 URL: https://github.com/llvm/llvm-project/commit/7974f12b1e3682514bd58b35c5a784f35938fa04 DIFF: https://github.com/llvm/llvm-project/commit/7974f12b1e3682514bd58b35c5a784f35938fa04.dif

[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

  1   2   3   4   5   6   7   >