Link Time Optimization

From CDOT Wiki
Revision as of 23:32, 1 October 2017 by 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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

Resources