[clang] [C++20] [Modules] Introduce -fmodules-reduced-bmi (PR #85050)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 26 18:46:29 PDT 2024


ChuanqiXu9 wrote:

> > > > @iains @dwblaikie Understood. And I thought the major problem is that there are a lot flags from clang modules. And it is indeed confusing. But given we have to introduce new flags in this case, probably we can only try to make it more clear by better documents.
> > > 
> > > 
> > > So you do not think it possible to restrict the new flag to be "internal" (i.e. cc1-only) and to put some _temporary_ driver processing to handle that? (I agree that this is an unusual mechanism, but the idea is to recognise that the driver-side processing is only expected to me temporary).
> > 
> > 
> > I have no idea how can we make that. We still need the users to provide something to enable reduced BMI. And I think it is symmetric to a new flag.
> 
> What I mean is that (a) we need the internal 'cc1' flag permanently; but (b) we do not expect to need a user-facing driver flag permanently. and (c) We want to allow users to try this out.
> 
> I am suggesting we could say "to try this out use -Xclang -fmodules-reduced-bmi" and have _temporary_ code in the driver to deal with the changes needed to phasing.
> 
> If this is not possible. then I suppose I am a bit sad that we keep saying 'there are too many modules options' - but yet still add more. however - we need to make progress, so if the suggestion here is really a non-starter .. then such is life.
> 
> Perhaps the second suggestion (-fexperimental-xxxxx options) could be discussed at the project level.

Got your point. But I feel the `-Xclang xxx` style or the `-fexperimental-xxx` style may make people feel, "oh, this is not ready, let's wait". Then we may lose more testing opportunity. Also I feel such options are symmetric to the existing one. It still makes the interfaces to be more complicated. I don't feel they are better than the existing one.

And yes, it is indeed that we have a lot modules options. But I think this may not be the blocking point for adding new modules options if we think it is really needed. If there are things needed to be added by flags really and we don't do that due to we feel we have too many flags, I feel it is somewhat "not eating for fear of choking". I think what we need to do for this case is to be pretty careful when adding new flags and I think we already make it for Reduced BMI.

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


More information about the cfe-commits mailing list