IRILL - Research and Innovation on Free Software

lld - Solving the Linking Performance Problem


"lld - Solving the Linking Performance Problem"
by Michael Spencer - Sony Computer Entertainment America,
on 2013-04-30 00:00:00
Download Webm format
Download MP4 format

lld is a LLVM subproject with the goal of building a fast, modular, and cross platform linker. lld is under very active development. It can currently link moderately complex programs, including itself and LLVM. Link time performance is a critical part of lld, and it takes several measures to improve it. The Atom graph model simplifies linking which also makes parallelizing the link simpler. It also provides a method to evaluate linker scripts without serializing the entire link. We have also taken a step back to look at the entire linking process and have found a major area for improvement. A significant amount of time while linking is spent reading object files and converting the information they contain into a format suitable for the linker. We can improve this by reading in parallel and reading lazily, however this can only take us so far. The real solution is to have the compiler emit object files designed for linking performance. Since we have a simple internal model in the linker, we have developed a native object file format that matches this model and that is designed specifically for linking performance. It is designed around the data structures and algorithms used in linking, while still maintaining all of the semantics of various object file formats. It is also very easy for compilers to generate. This allows us to bypass the work of processing traditional object files and jump directly to the core linking process. This talk will explore the the linking performance problem and lld's solutions.