[PATCH] D138552: [docs] Document that the modules can improve the linking time

2022-11-27 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu abandoned this revision. ChuanqiXu added a comment. In D138552#3951462 , @dblaikie wrote: >> And another problem here is, without LTO, the function definitions in other >> TU can't be inlined. But now, the function definitions in the module >>

[PATCH] D138552: [docs] Document that the modules can improve the linking time

2022-11-25 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. > And another problem here is, without LTO, the function definitions in other > TU can't be inlined. But now, the function definitions in the module > interface can be imported to the importee as AvaialableExternally linkage > with optimization. The AvaialableExternall

[PATCH] D138552: [docs] Document that the modules can improve the linking time

2022-11-24 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. >> I'd be curious to learn how linking time can be reduced significantly by >> deploying modules. Oh, today I found the conclusion "significant decrease in link time time" was not responsible. Since I didn't recognize that our projects uses thinlto and thinlto cache.

[PATCH] D138552: [docs] Document that the modules can improve the linking time

2022-11-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. This seems comparing different things... As mentioned, header files can be refactored to reduce the number of symbols as well. I'd be curious to learn how linking time can be reduced significantly by deploying modules. Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D138552: [docs] Document that the modules can improve the linking time

2022-11-23 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. I'm not sure I follow this - the comparison doesn't seem equal. If you wanted the modules-like code in non-modules, you could get it by having `notDirectlyUsed` declared-but-not-defined in the header file, and defined in the corresponding .cpp file, yeah? Repository:

[PATCH] D138552: [docs] Document that the modules can improve the linking time

2022-11-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: dblaikie, iains, aaronmondal, MaskRay. Herald added a subscriber: StephenFan. Herald added a project: All. ChuanqiXu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We found that t