Add ProgramUsage support for nested modules.

Previously, we would not scan our base module for variable usage when
preparing to optimize a loaded module. This worked in practice, because
modules were previously unable to call code inside other modules at all.

Change-Id: I1936485ed9f4160cad785d6227102dd1d9ffb34e
Bug: skia:13164
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/532397
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 files changed