[all-commits] [llvm/llvm-project] e2510b: [clang] SourceManager: Cache offsets for LastFileI...
Haojian Wu via All-commits
all-commits at lists.llvm.org
Fri Jul 4 13:12:20 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e2510b189dae1a18c1e84ea69c99ff417950e03a
https://github.com/llvm/llvm-project/commit/e2510b189dae1a18c1e84ea69c99ff417950e03a
Author: Haojian Wu <hokein.wu at gmail.com>
Date: 2025-07-04 (Fri, 04 Jul 2025)
Changed paths:
M clang/include/clang/Basic/SourceManager.h
M clang/lib/Basic/SourceManager.cpp
Log Message:
-----------
[clang] SourceManager: Cache offsets for LastFileIDLookup to speed up getFileID (#146782)
`getFileID` is a hot method. By caching the offset range in
`LastFileIDLookup`, we can more quickly check whether a given offset
falls within it, avoiding calling `isOffsetInFileID`.
https://llvm-compile-time-tracker.com/compare.php?from=0588e8188c647460b641b09467fe6b13a8d510d5&to=64843a500f0191b79a8109da9acd7e80d961c7a3&stat=instructions:u
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