Escape analysis

Escape analysis is an optimization for identifying objects which do not escape the dynamic extent of a function; such objects can be stack-allocated, or 'flattened' so that usages of them are replaced with a series of local variables (the latter optimization is known as "scalar replacement").

An overview of the escape analysis algorithm used in Factor's Optimizing compiler:

Register allocation

Static Single Assignment (SSA)

Instruction selection

Notes on Graph Algorithms Used in Optimizing Compilers - Carl Offner


Tags: language   reading   llvm   native   langdev  

Last modified 20 December 2022