Problem ------- In this assignment we will learn the role of Link Time Optimization (LTO). LTO combines all compilation units that make up a single executable and enables optimization of the entire program as a single unit. LTO can only combine the translation units submitted to GCC and hence library functions are not covered by LTO. This expands the scope of interprocedural optimizations to encompass the whole program (or, rather, everything that is visible at link time). A dynamic plugin for interprocedural pass is provided to you. This pass iterates over the call graph generated by GCC and prints the names of the function and its callers. Makefile and the input programs `test1.c' & `test2.c' are also provided. i. Use the Makefile and build the target with the option "-flto -flto-partiton=none" ii. Use the Makefile and build the target with the option "-flto" Observe the output which is generated in the dump file with the extension `.callers' for the individual test programs. Also observe the output generated after merging the .o files. a. What difference do you observe? b. When we do not specify -flto-partition=none as an option, function names are not printed in the merged dump file. Can you make suitable changes in the code to fix it? Procedure --------- The following steps are to followed to execute the given pass. The Makefile used the name `merged' for the combined translation unit. 1. Execute the plugin by giving the command `make test' The option "-flto" has not been specified for this target. 2. Read the dump file with the extension `.callers' for individual test files. Do you find a file called `merged.*.callers'? 3. Execute the plugin by giving the command `make test-none' The option used for this target is "-flto -flto-partition=none" 4. Read the dump file `callers' for individual test files as also the file `merged.*.callers'. 5. Execute the plugin by giving the command `make test-default' The option that is used for this target is "-flto" 6. Read the dump file `callers' for individual test files as also the file `merged.*.callers'. 7. Observe the difference in the output and explain.