-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[C++20] [Modules] Record BMI Hash which is consistent if the interfaces doesn't change #71618
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
Comments
@llvm/issue-subscribers-clang-modules Author: Chuanqi Xu (ChuanqiXu9)
The motivating example comes from https://github.com//issues/70569.
For example, // a.cppm
export module a;
export int a() {
return 43;
}
// use.cc
import a;
int use() {
return a();
} After we change the implementation of |
(might be worth linking to the discourse thread from here so we don't duplicate the discussion) |
Good idea. We've discussed the ideas here: https://discourse.llvm.org/t/rfc-c-20-modules-introduce-thin-bmi-and-decls-hash/74755 |
This is somehow covered by #86912 with Now for the example with reduced BMI:
Now although B will almost always get changed if module A changes, but the BMI of B won't change if it doesn't affect the interface. Then we can avoid the recompilation of C. Note that the original idea that avoid changing the BMI of Then I'd like to close the issue since we may not record and read a BMI hash but generate the same BMI directly. |
With #92511 landed, I think we can close this. |
The motivating example comes from #70569.
For example,
After we change the implementation of
a()
fromreturn 43;
toreturn 44;
, we can avoid recompiling use.cc to use.o since the interface doesn't change.This is pretty helpful to improve the user's experience by avoiding unnecessary recompilations as much as possible.
The text was updated successfully, but these errors were encountered: