You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ChuanqiXu9
changed the title
Generating .o file for module takes time proportional to unused code in imported modules
[C++20] [Modules] Generating LLVM IR takes time proportional to unused code in imported modules
Feb 13, 2023
Closellvm/llvm-project#60693.
In this issue, we can find that the importer will try to generate the
template specialization again in the importer, which is not good and
wastes time. This patch tries to address the problem.
Given the following two translation units:
export module b; import a;
After calling
I would expect module
b
should be compiled very quickly. Instead, I seewhich is reasonable, but
which is not reasonable. This time scales linearly with the number of explicit template instantiations in
module a
.This is as of 9f20142, but I have experienced this slowness in any version that supports modules.
The text was updated successfully, but these errors were encountered: