r369616 - [analyzer] Enable control dependency condition tracking by default
Artem Dergachev via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 23 13:15:16 PDT 2019
I had a look and i don't observe any regressions here. Both this test
alone and the whole test suite in general take as much time as on
r369520 for me. Additionally, -analyzer-stats doesn't indicate that any
significant amount of time was spent in bug report post-processing.
On 8/23/19 11:41 AM, Kristóf Umann wrote:
> Totally possible, thanks for letting me know! There should be plenty
> of room for caching, because I do calculate control dependencies in an
> excess for the same CFG, and the retrieval of a basic block from an
> ExplodedNode is anything but efficient, though I honestly didnt expect
> a performance hit that drastic (and havent experienced it either).
>
> I'll roll out some fixes during the weekend. If the problem persists
> after that, I'd be happy to dig deeper.
>
>
> On Fri, 23 Aug 2019, 20:33 Alexander Kornienko, <alexfh at google.com
> <mailto:alexfh at google.com>> wrote:
>
> I suspect that this patch makes analysis much slower in certain
> cases. For example, the clang/test/Analysis/pr37802.cpp test has
> become ~5 times slower in some configurations in our environment.
> This happened somewhere between r369520 and r369679, and your
> series of patches seems most suspicious :). Is it expected? Can it
> be improved?
>
> On Thu, Aug 22, 2019 at 5:07 AM Kristof Umann via cfe-commits
> <cfe-commits at lists.llvm.org <mailto:cfe-commits at lists.llvm.org>>
> wrote:
>
> Author: szelethus
> Date: Wed Aug 21 20:08:48 2019
> New Revision: 369616
>
> URL: http://llvm.org/viewvc/llvm-project?rev=369616&view=rev
> Log:
> [analyzer] Enable control dependency condition tracking by default
>
> This patch concludes my GSoC'19 project by enabling
> track-conditions by default.
>
> Differential Revision: https://reviews.llvm.org/D66381
>
> Modified:
> cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def
> cfe/trunk/test/Analysis/analyzer-config.c
> cfe/trunk/test/Analysis/diagnostics/no-store-func-path-notes.m
> cfe/trunk/test/Analysis/return-value-guaranteed.cpp
> cfe/trunk/test/Analysis/track-control-dependency-conditions.cpp
>
> Modified:
> cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def?rev=369616&r1=369615&r2=369616&view=diff
> ==============================================================================
> ---
> cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def
> (original)
> +++
> cfe/trunk/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def
> Wed Aug 21 20:08:48 2019
> @@ -294,7 +294,7 @@ ANALYZER_OPTION(bool, DisplayCTUProgress
> ANALYZER_OPTION(bool, ShouldTrackConditions, "track-conditions",
> "Whether to track conditions that are a
> control dependency of "
> "an already tracked variable.",
> - false)
> + true)
>
> ANALYZER_OPTION(bool, ShouldTrackConditionsDebug,
> "track-conditions-debug",
> "Whether to place an event at each tracked
> condition.",
>
> Modified: cfe/trunk/test/Analysis/analyzer-config.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/analyzer-config.c?rev=369616&r1=369615&r2=369616&view=diff
> ==============================================================================
> --- cfe/trunk/test/Analysis/analyzer-config.c (original)
> +++ cfe/trunk/test/Analysis/analyzer-config.c Wed Aug 21
> 20:08:48 2019
> @@ -87,7 +87,7 @@
> // CHECK-NEXT: suppress-c++-stdlib = true
> // CHECK-NEXT: suppress-inlined-defensive-checks = true
> // CHECK-NEXT: suppress-null-return-paths = true
> -// CHECK-NEXT: track-conditions = false
> +// CHECK-NEXT: track-conditions = true
> // CHECK-NEXT: track-conditions-debug = false
> // CHECK-NEXT: unix.DynamicMemoryModeling:Optimistic = false
> // CHECK-NEXT: unroll-loops = false
>
> Modified:
> cfe/trunk/test/Analysis/diagnostics/no-store-func-path-notes.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/diagnostics/no-store-func-path-notes.m?rev=369616&r1=369615&r2=369616&view=diff
> ==============================================================================
> ---
> cfe/trunk/test/Analysis/diagnostics/no-store-func-path-notes.m
> (original)
> +++
> cfe/trunk/test/Analysis/diagnostics/no-store-func-path-notes.m
> Wed Aug 21 20:08:48 2019
> @@ -16,6 +16,7 @@ extern int coin();
> return 0;
> }
> return 1; // expected-note{{Returning without writing to
> '*var'}}
> + // expected-note at -1{{Returning the value 1, which
> participates in a condition later}}
> }
> @end
>
>
> Modified: cfe/trunk/test/Analysis/return-value-guaranteed.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/return-value-guaranteed.cpp?rev=369616&r1=369615&r2=369616&view=diff
> ==============================================================================
> --- cfe/trunk/test/Analysis/return-value-guaranteed.cpp (original)
> +++ cfe/trunk/test/Analysis/return-value-guaranteed.cpp Wed
> Aug 21 20:08:48 2019
> @@ -24,6 +24,7 @@ bool parseFoo(Foo &F) {
> // class-note at -1 {{The value 0 is assigned to 'F.Field'}}
> return !MCAsmParser::Error();
> // class-note at -1 {{'MCAsmParser::Error' returns true}}
> + // class-note at -2 {{Returning zero, which participates in a
> condition later}}
> }
>
> bool parseFile() {
> @@ -57,6 +58,7 @@ namespace test_break {
> struct MCAsmParser {
> static bool Error() {
> return false; // class-note {{'MCAsmParser::Error'
> returns false}}
> + // class-note at -1 {{Returning zero, which participates in
> a condition later}}
> }
> };
>
> @@ -72,6 +74,7 @@ bool parseFoo(Foo &F) {
> return MCAsmParser::Error();
> // class-note at -1 {{Calling 'MCAsmParser::Error'}}
> // class-note at -2 {{Returning from 'MCAsmParser::Error'}}
> + // class-note at -3 {{Returning zero, which participates in a
> condition later}}
> }
>
> bool parseFile() {
>
> Modified:
> cfe/trunk/test/Analysis/track-control-dependency-conditions.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/track-control-dependency-conditions.cpp?rev=369616&r1=369615&r2=369616&view=diff
> ==============================================================================
> ---
> cfe/trunk/test/Analysis/track-control-dependency-conditions.cpp
> (original)
> +++
> cfe/trunk/test/Analysis/track-control-dependency-conditions.cpp
> Wed Aug 21 20:08:48 2019
> @@ -6,6 +6,7 @@
>
> // RUN: not %clang_analyze_cc1 -verify %s \
> // RUN: -analyzer-checker=core \
> +// RUN: -analyzer-config track-conditions=false \
> // RUN: -analyzer-config track-conditions-debug=true \
> // RUN: 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID-DEBUG
>
> @@ -22,6 +23,7 @@
>
> // RUN: %clang_analyze_cc1 %s -verify \
> // RUN: -analyzer-output=text \
> +// RUN: -analyzer-config track-conditions=false \
> // RUN: -analyzer-checker=core
>
> namespace example_1 {
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org <mailto:cfe-commits at lists.llvm.org>
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190823/472ce203/attachment-0001.html>
More information about the cfe-commits
mailing list