[all-commits] [llvm/llvm-project] f2695a: [C++20] [Modules] Avoid writing untouched DeclUpda...
Chuanqi Xu via All-commits
all-commits at lists.llvm.org
Wed Apr 17 20:02:08 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f2695a1c2f561da42b973187a254b6eeb7da76a9
https://github.com/llvm/llvm-project/commit/f2695a1c2f561da42b973187a254b6eeb7da76a9
Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
Date: 2024-04-18 (Thu, 18 Apr 2024)
Changed paths:
M clang/include/clang/AST/ASTMutationListener.h
M clang/include/clang/AST/Decl.h
M clang/include/clang/Serialization/ASTWriter.h
M clang/lib/AST/ASTContext.cpp
M clang/lib/AST/Decl.cpp
M clang/lib/Frontend/MultiplexConsumer.cpp
M clang/lib/Sema/SemaModule.cpp
M clang/lib/Serialization/ASTWriter.cpp
A clang/test/Modules/reduced-bmi-empty-module-purview.cppm
Log Message:
-----------
[C++20] [Modules] Avoid writing untouched DeclUpdates from GMF in
Reduced BMI
Mitigate https://github.com/llvm/llvm-project/issues/61447
The root cause of the above problem is that when we write a declaration,
we need to lookup all the redeclarations in the imported modules. Then
it will be pretty slow if there are too many redeclarations in different
modules. This patch doesn't solve the porblem.
What the patchs mitigated is, when we writing a named module, we shouldn't
write the declarations from GMF if it is unreferenced **in current
module unit**. The difference here is that, if the declaration is used
in the imported modules, we used to emit it as an update. But we
definitely want to avoid that after this patch.
For that reproducer in
https://github.com/llvm/llvm-project/issues/61447, it used to take 2.5s
to compile and now it only takes 0.49s to compile, which is a big win.
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