Inline is an optimization pass for the SSA IntermediateLanguage, invoked from SSASimplify.
Description
This pass inlines SSA functions using a size-based metric.
Implementation
Details and Notes
The Inline pass can be invoked to use one of three metrics:
-
NonRecursive(product, small)
— inline any function satisfying(numCalls - 1) * (size - small) ⇐ product
, wherenumCalls
is the static number of calls to the function andsize
is the size of the function. -
Leaf(size)
— inline any leaf function smaller thansize
-
LeafNoLoop(size)
— inline any leaf function without loops smaller thansize