Track variable writes via ProgramUsage instead of ProgramVisitor.
This replaces a potentially expensive tree walk with a map lookup. It
should speed up the inliner (on sksl_large) by about 4%, and speed up
the benchmark overall by >1%.
Change-Id: I68ef492d2aba6303753fad01dcbef1eaffb7a6f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/386556
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2 files changed