[all-commits] [llvm/llvm-project] 53a4a2: [clang] NFCI: Optimize storage and lookup of analy...

Jan Svoboda via All-commits all-commits at lists.llvm.org
Fri Apr 21 10:40:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 53a4a2b45bb2407f3249dea54f1a8b3e230b188a
      https://github.com/llvm/llvm-project/commit/53a4a2b45bb2407f3249dea54f1a8b3e230b188a
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2023-04-21 (Fri, 21 Apr 2023)

  Changed paths:
    M clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h

  Log Message:
  -----------
  [clang] NFCI: Optimize storage and lookup of analyzer options

This patch moves `llvm::sort()` from `AnalyzerOptions` constructor to initialization of local static variable in `isUnknownAnalyzerConfig()`.

This avoids unnecessary work, which can speed up Clang tools that initialize lots of `CompilerInvocation`s (and therefore `AnalyzerOptions`).

Reviewed By: steakhal

Differential Revision: https://reviews.llvm.org/D137258




More information about the All-commits mailing list