[all-commits] [llvm/llvm-project] 0dfb5d: [clang][modules] Remove preloaded SLocEntries from...
Jan Svoboda via All-commits
all-commits at lists.llvm.org
Fri Oct 6 12:50:30 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0dfb5dadc6df0fdc1a25b02921d1faa3d955cd5d
https://github.com/llvm/llvm-project/commit/0dfb5dadc6df0fdc1a25b02921d1faa3d955cd5d
Author: Jan Svoboda <jan_svoboda at apple.com>
Date: 2023-10-06 (Fri, 06 Oct 2023)
Changed paths:
M clang/include/clang/Basic/SourceLocation.h
M clang/include/clang/Basic/SourceManager.h
M clang/include/clang/Serialization/ASTBitCodes.h
M clang/include/clang/Serialization/ModuleFile.h
M clang/lib/Basic/SourceManager.cpp
M clang/lib/Serialization/ASTReader.cpp
M clang/lib/Serialization/ASTWriter.cpp
M clang/unittests/Basic/SourceManagerTest.cpp
Log Message:
-----------
[clang][modules] Remove preloaded SLocEntries from PCM files (#66962)
This commit removes the list of SLocEntry offsets to preload eagerly
from PCM files. Commit introducing this functionality (258ae54a) doesn't
clarify why this would be more performant than the lazy approach used
regularly.
Currently, the only SLocEntry the reader is supposed to preload is the
predefines buffer, but in my experience, it's not actually referenced in
most modules, so the time spent deserializing its SLocEntry is wasted.
This is especially noticeable in the dependency scanner, where this
change brings 4.56% speedup on my benchmark.
More information about the All-commits
mailing list