[all-commits] [llvm/llvm-project] 216397: Speed up common template argument checks

Mehdi Amini via All-commits all-commits at lists.llvm.org
Fri Sep 11 04:47:20 PDT 2026


  Branch: refs/heads/users/mamini/clang-speed-template-argument-checks
  Home:   https://github.com/llvm/llvm-project
  Commit: 21639716931492d67ccec24a9565553036b75099
      https://github.com/llvm/llvm-project/commit/21639716931492d67ccec24a9565553036b75099
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2026-09-11 (Fri, 11 Sep 2026)

  Changed paths:
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaTemplate.cpp

  Log Message:
  -----------
  Speed up common template argument checks

Avoid setting up pack and constraint machinery for ordinary unconstrained
template argument lists. Reuse canonical type work, keep common converted
argument lists inline, and skip default-substitution comparisons when the
parameter has no default.

CTMark O0 (3 samples, CPU 6): 29.439800 s -> 29.315900 s (-0.421%).

Impact on significant TUs in MLIR build time:
- `mlir/lib/RegisterAllDialects.cpp`: 0.7009% fewer retired
  instructions.
- `mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp`: 0.6378% fewer retired
  instructions.

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