[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 17 23:58:28 PDT 2022


ChuanqiXu added a comment.

> Yes, all of this stuff is important (and, yes, we are drifting into other [related] topics) - we already have a mechanism for providing function bodies to optimisation [LTO] - I do not think we should want to make module interfaces larger than necessary to duplicate that functionality (the reason we do now is because all the information needs to be present to feed into codegen) - it has been a long-term objective (I think listed even in @rsmith 's modules TODO list) to remove the unneeded BMI content.

I remembered the @rsmith's TODO list was about the the discarding entities in the GMF (I just found that I forgot to review your patches.). I am not sure if I mis remembered. And I agree it'll be great to reduce the size of module interfaces. I've heard the concern from Mathias that the size of BMI may affect the distributed building. Also in our internal practicing, we also use ThinLTO and we'll tuning ThinLTO for better performance. **BUT** from the general perspective of users, LTO (not ThinLTO) is not used widely. I only see people use it in cases where they need a score to show the performance or in some kernel cases. It is not common. Also from our simple experience, Dropping function bodies from module interface and ThinLTO will get worse performance than original ThinLTO. This is a performance regression too. I mean it'll be a drastic change and so it'll be a longer-term objective.

> Actually, my point was meant to be quite simple and directly related to this patch that the choice of options name should be something that would be obvious to the end-user, ideally we should have related options named similarly and we should avoid using terms that are familiar to compiler engineers but not necessarily to the end user.

Yeah, agreed. But as I said,  I originally uses the term `module file`. But @ruoso suggested the term `BMI`. So now in https://clang.llvm.org/docs/StandardCPlusPlusModules.html#built-module-interface-file, we uses the term `BMI` to end users and module-file is not a defined term now.. So it may be better to use `BMI` than `module-file` from the perspective.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134267/new/

https://reviews.llvm.org/D134267



More information about the cfe-commits mailing list