Refactoring plan of SILVisitor for LTO

If you have the time, have a look at:

It gives detailed information about the cross-TU analysis and the overall architecture.

Feel free to ignore me.

I totally agree that the LTO backend does optimisations and codegen.

Thanks for your information!

Thanks for your work. I am looking forward to use LTO in Swift.

Yes.

Great. First step is having a working serialized SIL.

To me, this is just cross-module optimization. You could call it thin-cross-module-optimization if you want to distinguish it from the less-scalable approach.

I don't understand that. An important distinction between .swiftmodule and .sib, is that the former needs to be loaded when its imported by other modules and the later is purely used for codegen within a module. There's nothing cross-module about the .sib. The module summary is only useful to export information that's already in the .sib to other modules. Both the .swiftmodule and the summary can embed assumptions about code within the .sib files.

I'm perfectly fine using separate files anyway. I think that makes debugging easier.

1 Like