Endilll wrote:

> Was there ever an RFC on this whole 'splitting up Sema' project?

It was quite extensively discussed in #84184, but it wasn't deemed necessary to 
go through RFC process for a non-functional change that doesn't affect stable 
interfaces.

> I think starting up from the easier bits is a risky proposition, as we might 
> realize this whole thing will fail when we get to the harder parts.

`Sema` has grown so big and interconnected that it's virtually impossible to 
wrap a head around it to solve hard problems first. 

> I also think this can lead in the future to the same sort of problems 
> overusing const got us in the first place: needing large amount of repetitive 
> changes all around when a commonly used or deeply nested component starts 
> depending on a larger chunk of Sema.

I recently looked into our `const` situation, and I definitely agree that it's 
overused. I believe one of the reasons it's hard to address systematically at 
the `Sema` level is again its size and tight coupling of everything to 
everything, which makes it hard to figure out "leaves" of call chains to start 
to rectify the situation without viral changes.

> Also, this will further cement current design lines, without considering 
> where we want to be in the future.

I believe cemented design line between `Sema` and `Parser` served us well, even 
if it's limiting sometimes. That said, changes I'm making doesn't really cement 
anything yet. Everything is still available from everywhere (save for static 
functions). The difference is that dependencies between parts of `Sema` become 
more visible.

> And lastly, it seems this will lead to large amounts of code churn without 
> proportional benefit, impacting in-tree development as well as external 
> projects.

I believe that we're significantly improving maintainability here, and the 
churn is worth it in the long run. For instance, #82217 took me whopping 20-25 
hours of non-stop work to finish. Doing that in one step was requested by 
downstreams.

https://github.com/llvm/llvm-project/pull/92645
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to