kbelochapka wrote:

> > The main drawback is that it would require substantial changes to the 
> > existing implementation. For example, LTO.h would likely need to be 
> > rewritten almost entirely, potentially affecting 70% or more of the file.
> 
> You just need to replace LTO::Config and it should not affect anything in 
> LTO.h? The switch should just be NFCI.
> 
> I don't think tablegen is needed since everything in LTO::Config is very 
> simple. You might still want to do the round trip if there are some 
> customized handling that is not handled by macro.

Hi @cachemeifyoucan ,
It's not just lto::Config; we would also need to handle all of the 
classes/structures that are members of lto::Config, such as llvm::TargetOptions.
That said, I think the idea is fundamentally sound. I will proceed to implement 
a prototype, which should give us a clearer picture of how much of existing 
code would need to be refactored.

https://github.com/llvm/llvm-project/pull/219894
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to