Add built-in functions as a Transform pass.
Previously, each FunctionDefinition contained a set which tracked all
of the built-in functions that it called--kind of like ProgramUsage,
on a function-by-function basis. This map was used to populate built-
in functions into the program.
The map has been removed and now we scan usage.fCallCounts directly to
find and include calls into built-in functions. We continue scanning
and adding until we reach steady-state. We don't need to run a
ProgramVisitor over the code at all, or maintain any state in the
FunctionDefinition.
Change-Id: Id722244533d19782af1f7dbffb2afa0585983a0d
Bug: skia:13587
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/562960
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
15 files changed