[all-commits] [llvm/llvm-project] ac93c2: [Clang] Cache stable primary declaration contexts

Mehdi Amini via All-commits all-commits at lists.llvm.org
Wed Sep 16 16:34:55 PDT 2026


  Branch: refs/heads/users/mamini/clang-speed-inline-ast-context
  Home:   https://github.com/llvm/llvm-project
  Commit: ac93c24b10b31f964ec14e33aacd47dd6e2f314c
      https://github.com/llvm/llvm-project/commit/ac93c24b10b31f964ec14e33aacd47dd6e2f314c
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2026-09-16 (Wed, 16 Sep 2026)

  Changed paths:
    M clang/include/clang/AST/DeclBase.h
    M clang/lib/AST/DeclBase.cpp
    M clang/unittests/AST/DeclTest.cpp

  Log Message:
  -----------
  [Clang] Cache stable primary declaration contexts

Cache primary contexts whose identity cannot change. Continue resolving
namespaces, C tags, and Objective-C contexts dynamically, and leave incomplete
C++ records uncached. Add regression coverage for mutable primary identities.

Three-sample medians versus the AST-context parent:
- RegisterAllDialects: 62,561,621,359 -> 61,772,265,706 instructions
  (-1.262%); peak RSS 1,375,288 -> 1,379,564 KiB (+0.311%).
- NVVMDialect: 90,739,370,711 -> 90,247,122,518 instructions (-0.543%);
  peak RSS 1,157,772 -> 1,157,812 KiB (+0.003%).
- CTMark O0: 29.4799 -> 29.4838 s (+0.013%); maximum per-test compile RSS
  265,072,640 -> 266,158,080 bytes (+0.409%).

Assisted-by: 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