-
Notifications
You must be signed in to change notification settings - Fork 12.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Modules] Increased build times across translation units in O0 #61064
Comments
@llvm/issue-subscribers-clang-modules |
This should be duplicated with #60996 |
Oh, sorry. This is not duplicated with #60996 since that issues focus on the optimization mode and this issue is not related to optimizations. |
Here are more profiled information for this: https://discourse.llvm.org/t/modules-increased-build-times/68755/6 |
My bad, I should have been more explicit. |
@koplas Now I expected this can produce a strong impact on modular codes. However, in a realworld local modularized project, I only found this patch can produce 3% improvements. It makes sense in some level since the reproducer is in the very edging case. Could you help to test clang again in your project and share the profile results in the above link? Thanks in advance. |
Close llvm/llvm-project#61064. The root cause of the issue is that we will deserilize some declarations eagerly when reading the BMI. However, many declarations in the BMI are not necessary for the importer. So it wastes a lot of time.
…odules Close #61064. The root cause of the issue is that we will deserilize some declarations eagerly when reading the BMI. However, many declarations in the BMI are not necessary for the importer. So it wastes a lot of time. The new commit handles the MSVC's extension #pragma comment and #pragma detect_mismatch to follow MSVC's behavior. See pr61783 for details.
…odules Close llvm#61064. The root cause of the issue is that we will deserilize some declarations eagerly when reading the BMI. However, many declarations in the BMI are not necessary for the importer. So it wastes a lot of time. The new commit handles the MSVC's extension #pragma comment and #pragma detect_mismatch to follow MSVC's behavior. See pr61783 for details.
Given the following translation units:
And running the following:
Results in this output:
As expected the build times of
a.cppm
is high. However, even the build ofc.cppm
takes a lot of time.Note that in the pre-compiling phase of
b.cppm
andc.cppm
circa 200 ms is spent inWriteAst
, despite not having many lines of code.build-times-test.zip
The text was updated successfully, but these errors were encountered: