[PATCH] D86465: [analyzer][solver] Redesign constraint ranges data structure

Valeriy Savchenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 24 09:52:28 PDT 2020


vsavchenko added inline comments.


================
Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:88
+  //     structure is preferred.
+  using ImplType = llvm::SmallVector<Range, 4>;
+
----------------
grandinj wrote:
> Just curious - if they mostly contain 1 or 2 elements, why is N == 4  here?
Essentially, the main factor is **intuition** 😆 
The main idea here is that allocations are the single most expensive thing about ranges, so I want to avoid extra allocations not for 60% of range sets, but for 90%.  I still should definitely measure performance difference for different values of N and gather some stats about the lengths.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86465/new/

https://reviews.llvm.org/D86465



More information about the cfe-commits mailing list