[all-commits] [llvm/llvm-project] 83f4c3: [modules] Do not cache invalid state for modules t...
Volodymyr Sapsai via All-commits
all-commits at lists.llvm.org
Thu Jan 16 17:13:15 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 83f4c3af021cd5322ea10fd1c4e839874c1dae49
https://github.com/llvm/llvm-project/commit/83f4c3af021cd5322ea10fd1c4e839874c1dae49
Author: Volodymyr Sapsai <vsapsai at apple.com>
Date: 2020-01-16 (Thu, 16 Jan 2020)
Changed paths:
M clang/include/clang/Serialization/InMemoryModuleCache.h
M clang/lib/Serialization/ASTReader.cpp
M clang/lib/Serialization/ASTWriter.cpp
M clang/lib/Serialization/InMemoryModuleCache.cpp
M clang/lib/Serialization/ModuleManager.cpp
R clang/test/Modules/Inputs/implicit-invalidate-chain/A.h
R clang/test/Modules/Inputs/implicit-invalidate-chain/B.h
R clang/test/Modules/Inputs/implicit-invalidate-chain/C.h
R clang/test/Modules/Inputs/implicit-invalidate-chain/module.modulemap
R clang/test/Modules/implicit-invalidate-chain.c
M clang/unittests/Frontend/FrontendActionTest.cpp
M clang/unittests/Serialization/InMemoryModuleCacheTest.cpp
Log Message:
-----------
[modules] Do not cache invalid state for modules that we attempted to load.
Partially reverts 0a2be46cfdb698fefcc860a56b47dde0884d5335 as it turned
out to cause redundant module rebuilds in multi-process incremental builds.
When a module was getting out of date, all compilation processes started at the
same time were marking it as `ToBuild`. So each process was building the same
module instead of checking if it was built by someone else and using that
result. In addition to the work duplication, contention on the same .pcm file
wasn't making builds faster.
Note that for a single-process build this change would cause redundant module
reads and validations. But reading a module is faster than building it and
multi-process builds are more common than single-process. So I'm willing to
make such a trade-off.
rdar://problem/54395127
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D72860
More information about the All-commits
mailing list