[all-commits] [llvm/llvm-project] cc860d: Cache the most recent diagnostic source file
Mehdi Amini via All-commits
all-commits at lists.llvm.org
Fri Sep 11 01:39:53 PDT 2026
Branch: refs/heads/users/mamini/clang-speed-diagnostic-file-cache
Home: https://github.com/llvm/llvm-project
Commit: cc860d83cc45b6be8e037e72a747a4755303a5b4
https://github.com/llvm/llvm-project/commit/cc860d83cc45b6be8e037e72a747a4755303a5b4
Author: Mehdi Amini <joker.eph at gmail.com>
Date: 2026-09-11 (Fri, 11 Sep 2026)
Changed paths:
M clang/include/clang/Basic/Diagnostic.h
M clang/lib/Basic/Diagnostic.cpp
Log Message:
-----------
Cache the most recent diagnostic source file
Avoid repeated ordered-map lookups while diagnostics remain in the same
source file. Clear the cached map node whenever the map is reset.
CTMark O0 (3 samples, CPU 6): 29.439800 s -> 29.312967 s (-0.431%).
Impact on significant TUs in MLIR build time:
- `mlir/lib/RegisterAllDialects.cpp`: 1.0930% fewer retired
instructions.
- `mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp`: 0.5034% 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