Abstract

Most modern compilers for statically typed high level languages perform whole program optimization and compilation in order to generate highly optimized code. Whole program analysis and optimization has the advantage of providing the compiler with visibility to the entire program. This allows information to be propagated across procedures to improve the quality of the generated code. The main disadvantage of existing systems with this capability however, is that recompiling a program after an edit incurs the cost of reanalyzing and regenerating code for all functions. Compiler throughput is crucial for developers' everyday edit-compile-test cycle as well as build lab's automated rolling build. Improving the throughput of such builds significantly improves developer productivity and lab efficiency. We present a practical and extensible framework for incremental whole program optimization (WPO) and compilation. It uses two program abstractions, namely a dependence graph representing the program entities that the code for each function depends upon, and lattices of data-flow information that affect the code generated. These abstractions are used to minimize the number of functions that must be reanalyzed and recompiled after a program edit. The framework uses a simple and fast checksum technique for detecting edits to functions and variables, and experimental evidence that this technique works well in practice. We also present a novel mechanism for achieving the no code generation diff requirement in the presence of multi-level inline expansion. The system has been successfully implemented in the state-of-the-art commercial quality Visual C/C++ compiler and achieves up to 7X compilation speedup for typical edits.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.