Hi Dmitry, we are delighted you found contributing to GCC interesting.
On Mon, Mar 29 2021, Dmitry Torilov via Gcc wrote: > Greetings, > > I saw a task on your site for GSoC called <<Enable incremental Link Time > Optimization (LTO) linking>>. I am very interested in it, and I would > like to know if it is possible to do it this summer. I have experience > in C/C++ development as well as experience in related fields. I know how > to compile GCC, and I have a top-level understanding of how LTO works. > Unfortunately, I've never written compilers yet, but I've had experience > in developing a LISP interpreter, and I've also watched a lot of > conference talks about compilers. I am sending a link to my CV. I hope > that you will be interested in it. Can I ask you to tell me about the > further screening process for GSoC? there is no formal screening process and GCC does not impose any additional formal requirements on top of those of the GSoC program, except that we want students to announce their intention to apply so that we can help them write a good proposal and in the process learn about the project they apply for. I have CCed Honza who would be the primary mentor for this project. >From what I know about the project, I can suggest (apart from the suggestions at https://gcc.gnu.org/wiki/SummerOfCode) the following. Compile some small but non-trivial program with options -flto -save-temps and -v (in addition to one you would normally use). The *ltrans* files the compiler will produce are the partitions, which are currently all always compiled, even when a partition from an earlier build would do. The project should probably start with the driver (gcc/gcc.c) or perhaps lto-wrapper (gcc/lto-wrapper.c) stashing the *ltrans[0-9]*.o caching the files somewhere and then using the information about what is cached to prevent unnecessary compilation of a partition which is identical to one that has been compiled at some point in the past. So at this point I would suggest to study how exactly the driver, the lto-plugin (lto-plugin/lto-plugin.c), lto-wrapper and lto1 (gcc/lto/*.c) interact and where it would make sense to cache the partitions and retrieve them from the cache. Please do not hesitate to ask here on the mailing list if you struggle with reading the code, if you want to find out if your understanding is correct or need any help with any specific aspect of the project proposal. Good luck, Martin