[clang] Llvm modules on demand bmi (PR #71773)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 9 21:51:46 PST 2023


ChuanqiXu9 wrote:

> > > Whether we re-use wrapper code or make some new code is an implementation detail.
> > > It does not actually prevent you from taking the two-phase approach ( currently , --precompile will be unchanged in action).
> > 
> > 
> > It doesn't prevent the two-phase compilation model indeed. But it introduces a new way about how we produce BMIs.
> 
> It allows us to produce a new kind of BMI - that carries a minimised content, applicable to the interface, otherwise it is no different to the case where two command lines are needed to produce an object and BMI..

This is what thin BMI or interface BMI does.

> The difficulty that I have pointed out is that if we preserve the existing scheme but want an Interface BMI - we then have to produce a third compile line in the driver that takes the Implementation BMI and produces the Interface BMI from it. We cannot avoid producing the intermediate BMI here because the jobs are created by the driver and executed by the compiler and we need to Implementation BMI to produce the object.

Oh, this may be the root of the divergence here. In my mind, we can make it without producing new compile jobs. I've already  looked at the code. We can avoid producing the intermediate BMI by skipping some phases in the drivers.

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


More information about the cfe-commits mailing list