我要评分
获取效率
正确性
完整性
易理解

ThinLTO

There are two LTO types: FullLTO and ThinLTO. ThinLTO is an updated LTO technology. Compared with FullLTO, ThinLTO has better runtime performance, greatly reducing the LTO time and memory usage. ThinLTO consists of three phases:

  1. Compile: IRs are generated like FullLTO, but are extended using module summaries.
  2. Thin Link: A thin linker layer is used to combine module summaries and perform global analysis.
  3. ThinLTO backend: A parallel executable backend with module summary-based import and optimization uses global indexes to guide optimization and code generation of each module.

The following figure is from LLVM.