[clang] [C++20] [Modules] Introduce reduced BMI (PR #75894)

Iain Sandoe via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 3 03:35:23 PST 2024


iains wrote:

@ChuanqiXu9 very sorry for the slow review.  It would help me if the design was described in the commit message instead of trying to deduce it from the patch (maybe it's in a thread somewhere - so a cross-reference would help).

two immediate questions and one observation:

- I see you are using a multiplex consumer (actually, for some reason, I thought you were objecting to that part of my design); does this mean that your proposed solution can emit both the object and the reduced BMI from a single compilation job?

- I was concerned from earlier conversations that this design might require a codegen back end to be instantiated to allow the reduced BMI (which would be bad for --precompile/-fmodule-only type jobs). Any comments?

- It would be better to avoid introducing more layering violations but, as we discussed in face-to-face meetings, I have less concern on the output side.  It still seems to me that the best model is one where we have AST transforms (that very likely need Sema to be correct) and then the serializer is a simple as possible.

so  something like

raw AST  ======== > codegen (when required)
           +
           + =====> AST transforms ====> BMI output.

As I understand the patch you are combining the transform with the output?


https://github.com/llvm/llvm-project/pull/75894


More information about the cfe-commits mailing list