[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-17 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- EntryPointStats.cpp --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-17 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -0,0 +1,201 @@ +//===- EntryPointStats.cpp --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-17 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -0,0 +1,201 @@ +//===- EntryPointStats.cpp --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-17 Thread Mikael Holmén via cfe-commits
@@ -0,0 +1,201 @@ +//===- EntryPointStats.cpp --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-17 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/131175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/131175 >From 6b6d80d42d40d5917622cbc2bc0f2a454c34eca3 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Thu, 13 Mar 2025 18:42:39 +0100 Subject: [PATCH 1/8] [analyzer] Introduce per-entry-point statistics MIME-Ve

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/131175 >From 6b6d80d42d40d5917622cbc2bc0f2a454c34eca3 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Thu, 13 Mar 2025 18:42:39 +0100 Subject: [PATCH 1/3] [analyzer] Introduce per-entry-point statistics MIME-Ve

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,162 @@ +// EntryPointStats.h - Tracking statistics per entry point -*- C++ -*-// NagyDonat wrote: ```suggestion // EntryPointStats.h - Tracking statistics per entry point --*- C++ -*-// ``` Just a doubled space. https://github.com/llvm/llvm-project/p

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,27 @@ +=== +Analysis Statistics +=== + +CSA enjoys two facilities to collect statistics: per translation unit and per entry point. +We use llvm/ADT/Statistic.h for numbers describing the entire translation unit (TU). +We use clang/Stati

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/131175 >From 6b6d80d42d40d5917622cbc2bc0f2a454c34eca3 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Thu, 13 Mar 2025 18:42:39 +0100 Subject: [PATCH 01/10] [analyzer] Introduce per-entry-point statistics MIME-

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/131175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -688,6 +695,36 @@ AnalysisConsumer::getModeForDecl(Decl *D, AnalysisMode Mode) { return Mode; } +template +static clang::Decl *preferDefinitionImpl(clang::Decl *D) { + if (auto *X = dyn_cast(D)) +if (auto *Def = X->getDefinition()) + return Def; + return D; +

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/131175 >From 6b6d80d42d40d5917622cbc2bc0f2a454c34eca3 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Thu, 13 Mar 2025 18:42:39 +0100 Subject: [PATCH 01/11] [analyzer] Introduce per-entry-point statistics MIME-

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Donát Nagy via cfe-commits
@@ -353,6 +353,12 @@ ANALYZER_OPTION(bool, DisplayCTUProgress, "display-ctu-progress", "the analyzer's progress related to ctu.", false) +ANALYZER_OPTION( +StringRef, DumpSEStatsToCSV, "dump-se-stats-to-csv", NagyDonat wrot

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,27 @@ +=== +Analysis Statistics +=== + +CSA enjoys two facilities to collect statistics: per translation unit and per entry point. +We use llvm/ADT/Statistic.h for numbers describing the entire translation unit (TU). +We use clang/Stati

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,201 @@ +//===- EntryPointStats.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apach

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/131175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -0,0 +1,33 @@ +=== +Analysis Statistics +=== + +CSA enjoys two facilities to collect statistics: per translation unit and per entry point. necto wrote: Expanded to be on the safe side 548eaadabf32 Expand acronym https://githu

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -0,0 +1,201 @@ +//===- EntryPointStats.cpp --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/131175 >From 6b6d80d42d40d5917622cbc2bc0f2a454c34eca3 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Thu, 13 Mar 2025 18:42:39 +0100 Subject: [PATCH 01/15] [analyzer] Introduce per-entry-point statistics MIME-

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto edited https://github.com/llvm/llvm-project/pull/131175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,162 @@ +// EntryPointStats.h - Tracking statistics per entry point --*- C++ -*-// steakhal wrote: The line length seems odd. It's much smaller than 81 characters. Same observation goes at the end of this comment block. https://github.com/llvm/llvm-pro

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Donát Nagy via cfe-commits
@@ -12,3 +12,4 @@ Contents: developer-docs/nullability developer-docs/RegionStore developer-docs/PerformanceInvestigation + developer-docs/Statistics NagyDonat wrote: I am really happy that you're also adding a documentation page for this :smile: h

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,33 @@ +=== +Analysis Statistics +=== + +CSA enjoys two facilities to collect statistics: per translation unit and per entry point. steakhal wrote: While I share and use the CSA shorthand, I wonder if the dovs we shoul a

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- EntryPointStats.cpp --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/131175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/131175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto edited https://github.com/llvm/llvm-project/pull/131175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -0,0 +1,162 @@ +// EntryPointStats.h - Tracking statistics per entry point --*- C++ -*-// necto wrote: Fixed a93cac41b87d [NFC] Fix header comment widths https://github.com/llvm/llvm-project/pull/131175 ___ cfe-com

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -0,0 +1,27 @@ +=== +Analysis Statistics +=== + +CSA enjoys two facilities to collect statistics: per translation unit and per entry point. +We use llvm/ADT/Statistic.h for numbers describing the entire translation unit (TU). +We use clang/Stati

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,27 @@ +=== +Analysis Statistics +=== + +CSA enjoys two facilities to collect statistics: per translation unit and per entry point. +We use llvm/ADT/Statistic.h for numbers describing the entire translation unit (TU). +We use clang/Stati

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/131175 >From 6b6d80d42d40d5917622cbc2bc0f2a454c34eca3 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Thu, 13 Mar 2025 18:42:39 +0100 Subject: [PATCH 01/13] [analyzer] Introduce per-entry-point statistics MIME-

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/131175 >From 6b6d80d42d40d5917622cbc2bc0f2a454c34eca3 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Thu, 13 Mar 2025 18:42:39 +0100 Subject: [PATCH 01/12] [analyzer] Introduce per-entry-point statistics MIME-

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/131175 >From 6b6d80d42d40d5917622cbc2bc0f2a454c34eca3 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Thu, 13 Mar 2025 18:42:39 +0100 Subject: [PATCH 1/9] [analyzer] Introduce per-entry-point statistics MIME-Ve

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,27 @@ +=== +Analysis Statistics +=== + +CSA enjoys two facilities to collect statistics: per translation unit and per entry point. +We use llvm/ADT/Statistic.h for numbers describing the entire translation unit (TU). +We use clang/Stati

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/131175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Balazs Benics via cfe-commits
https://github.com/steakhal requested changes to this pull request. I only found a couple of minor points. Otherwise looks good. https://github.com/llvm/llvm-project/pull/131175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,27 @@ +=== +Analysis Statistics +=== + +CSA enjoys two facilities to collect statistics: per translation unit and per entry point. +We use llvm/ADT/Statistic.h for numbers describing the entire translation unit (TU). +We use clang/Stati

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Balazs Benics via cfe-commits
@@ -688,6 +695,36 @@ AnalysisConsumer::getModeForDecl(Decl *D, AnalysisMode Mode) { return Mode; } +template +static clang::Decl *preferDefinitionImpl(clang::Decl *D) { + if (auto *X = dyn_cast(D)) +if (auto *Def = X->getDefinition()) + return Def; + return D; +

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,201 @@ +//===- EntryPointStats.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apach

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,27 @@ +=== +Analysis Statistics +=== + +CSA enjoys two facilities to collect statistics: per translation unit and per entry point. +We use llvm/ADT/Statistic.h for numbers describing the entire translation unit (TU). +We use clang/Stati

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -0,0 +1,201 @@ +//===- EntryPointStats.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apach

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -353,6 +353,12 @@ ANALYZER_OPTION(bool, DisplayCTUProgress, "display-ctu-progress", "the analyzer's progress related to ctu.", false) +ANALYZER_OPTION( +StringRef, DumpSEStatsToCSV, "dump-se-stats-to-csv", necto wrote:

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -0,0 +1,27 @@ +=== +Analysis Statistics +=== + +CSA enjoys two facilities to collect statistics: per translation unit and per entry point. +We use llvm/ADT/Statistic.h for numbers describing the entire translation unit (TU). +We use clang/Stati

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -0,0 +1,162 @@ +// EntryPointStats.h - Tracking statistics per entry point -*- C++ -*-// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/131175 >From 6b6d80d42d40d5917622cbc2bc0f2a454c34eca3 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Thu, 13 Mar 2025 18:42:39 +0100 Subject: [PATCH 1/5] [analyzer] Introduce per-entry-point statistics MIME-Ve

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/131175 >From 6b6d80d42d40d5917622cbc2bc0f2a454c34eca3 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Thu, 13 Mar 2025 18:42:39 +0100 Subject: [PATCH 1/4] [analyzer] Introduce per-entry-point statistics MIME-Ve

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,201 @@ +//===- EntryPointStats.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apach

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Balazs Benics via cfe-commits
@@ -353,6 +353,12 @@ ANALYZER_OPTION(bool, DisplayCTUProgress, "display-ctu-progress", "the analyzer's progress related to ctu.", false) +ANALYZER_OPTION( +StringRef, DumpSEStatsToCSV, "dump-se-stats-to-csv", steakhal wrote

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: Thanks for contributing infrastructural improvements like this; these will be helpful in the analyzer development. Overall I'm satisfied with the idea of this commit; but I marked a few typos and stylistic suggestions in inline comments. https://github.

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,162 @@ +// EntryPointStats.h - Tracking statistics per entry point -*- C++ -*-// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/131175 >From 6b6d80d42d40d5917622cbc2bc0f2a454c34eca3 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Thu, 13 Mar 2025 18:42:39 +0100 Subject: [PATCH 1/2] [analyzer] Introduce per-entry-point statistics MIME-Ve

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-13 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r b3b00707821276deef812d8cccb228dd42c044d7...6b6d80d42d40d5917622cbc2bc0f2a454c34eca3 clang

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Arseniy Zaostrovnykh (necto) Changes So far CSA was relying on the LLVM Statistic package that allowed us to gather some data about analysis of an entire translation unit. However, the translation unit consists of a collection of loosely

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-13 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto created https://github.com/llvm/llvm-project/pull/131175 So far CSA was relying on the LLVM Statistic package that allowed us to gather some data about analysis of an entire translation unit. However, the translation unit consists of a collection of loosely related ent