This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Dynamic Compilation Advanced Topics: Dynamic compilation Today: Finish How to Compile Inlining in ahead of time and dynamic compilers Garbage collection Alias Analysis Interprocedural Analysis Dependence Testing Locality and parallelization CS 380C Lecture 16 1 Inlining Inlining Benefits and costs Direct benefit: reduced call overhead allocating and deallocating local variables saving and restoring registers call convention pushing and popping parameters on to the stack Indirect benefit: exposes optimization opportunities Direct cost: code size increases (mostly) and can thus can degrade instruction cache behavior Indirect/direct cost: increases compile time and space, e.g., tips the register allocator to spill CS 380C Lecture 16 2 Inlining Inlining Results vary across language and compiler J. W. Davidson & A. M. Holler, A Study of a C Function Inliner, SoftwarePractice and Experience , 18:8, August 1988 K.D. Cooper, M. Hall, & L. Torczon, An Experiment With Inline Substitution, SoftwarePractice and Experience , 21:6, June 1991 K.D. Cooper, M. Hall, & L. Torczon, Unexpected Side Effects of Inline Substitution: A Case Study, ACM LOPLAS 1(1), March 1992 M. D. Bond & K. S. McKinley, Practical Path Profiling for Dynamic Optimizers, CGO, March 2005. K. Hazelwood and D. Grove, Adaptive Online Context-Sensitive Inlining International Symposium on Compiler Code Generation and Optimizations (CGO), pp. 253264, San Francisco, CA March 2003....
View Full Document
- Fall '08