Difference between revisions of "Link Time Optimization"
Chris Tyler (talk | contribs) (Created page with "Category:SPO600 Link Time Optimization (LTO) defers some portions of a program's optimization from compile time to link time. In order to accomplish this, the internal rep...") |
(No difference)
|
Revision as of 22:32, 1 October 2017
Link Time Optimization (LTO) defers some portions of a program's optimization from compile time to link time. In order to accomplish this, the internal representation (IR) of each portion of the program (compilation unit) must be stored in the object file. On a Linux system, this is performed with additional ELF sections.
Without LTO, there is little or no information stored about code in separate compilation units such as code size (relevant to loop unrolling) and potential return values (relevant to dead code removal), preventing the application of certain optimizations when code is compiled in separate units and then combined in a link step. With LTO, the presence of IR data permits a number of optimizations to be applied at link time.