[all-commits] [llvm/llvm-project] 8e4b90: [clang][StaticAnalyzer] Optimize standard-library ...

David Zbarsky via All-commits all-commits at lists.llvm.org
Wed Jun 10 07:15:10 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8e4b90f8cae583e3f7212b30c2c86c5b0fcb7499
      https://github.com/llvm/llvm-project/commit/8e4b90f8cae583e3f7212b30c2c86c5b0fcb7499
  Author: David Zbarsky <dzbarsky at gmail.com>
  Date:   2026-06-10 (Wed, 10 Jun 2026)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp

  Log Message:
  -----------
  [clang][StaticAnalyzer] Optimize standard-library summaries for size (#202662)

StdLibraryFunctionsChecker::initFunctionSummaries is a large one-time
initialization routine. Its initializer-list construction is cold, but
optimizing it for speed causes extensive inlining and repeated
construction code in the binary.

Mark initFunctionSummaries with LLVM_ATTRIBUTE_MINSIZE so the optimizer
keeps the existing table construction out of line and selects
size-oriented code generation. Analyzer behavior and the runtime summary
representation are unchanged.

In the LLVM 22 Bazel build, standalone clang decreases from 130,098,288
to 130,015,696 bytes (-82,592), and stripped clang decreases from
108,098,128 to 107,999,520 bytes (-98,608).

Work towards #202616

AI tool disclosure: Co-authored with OpenAI Codex.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list