[PATCH] D82561: [analyzer][CrossTU] Lower CTUImportThreshold default value

Endre Fülöp via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 25 08:34:20 PDT 2020


gamesh411 created this revision.
gamesh411 added reviewers: martong, balazske.
Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun, whisperity.
Herald added a reviewer: Szelethus.
Herald added a project: clang.
gamesh411 updated this revision to Diff 273372.
gamesh411 added a comment.

update test value


The default value of 100 makes the analysis slow. Projects of considerable
size can take more time to finish than it is practical. The new default
setting of 8 is based on the analysis of LLVM itself. With the old default
value of 100 the analysis time was over a magnitude slower. Thresholding the
load of ASTUnits is to be extended in the future with a more fine-tuneable
solution that accomodates to the specifics of the project analyzed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82561

Files:
  clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def
  clang/test/Analysis/analyzer-config.c


Index: clang/test/Analysis/analyzer-config.c
===================================================================
--- clang/test/Analysis/analyzer-config.c
+++ clang/test/Analysis/analyzer-config.c
@@ -41,7 +41,7 @@
 // CHECK-NEXT: cplusplus.Move:WarnOn = KnownsAndLocals
 // CHECK-NEXT: crosscheck-with-z3 = false
 // CHECK-NEXT: ctu-dir = ""
-// CHECK-NEXT: ctu-import-threshold = 100
+// CHECK-NEXT: ctu-import-threshold = 8
 // CHECK-NEXT: ctu-index-name = externalDefMap.txt
 // CHECK-NEXT: ctu-invocation-list = invocations.yaml
 // CHECK-NEXT: deadcode.DeadStores:ShowFixIts = false
Index: clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def
===================================================================
--- clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def
+++ clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def
@@ -324,7 +324,7 @@
                 "Lowering this threshold can alleviate the memory burder of "
                 "analysis with many interdependent definitions located in "
                 "various translation units.",
-                100u)
+                8u)
 
 ANALYZER_OPTION(
     unsigned, AlwaysInlineSize, "ipa-always-inline-size",


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82561.273372.patch
Type: text/x-patch
Size: 1198 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200625/4944c43d/attachment-0001.bin>


More information about the cfe-commits mailing list