feed forward registers used by jit()

Since we make two jit() passes anyway (mainly for allocation size, with
stack size hinting along for the ride) we might as well feed forward
another hint, which registers we'll use in the program.

We can use this information when targeting the Windows ABI to save only
the callee-saved registers that we actually use.  ARM will benefit too.

The first jit() call always saves all callee-saved registers , making
its code size a conservative estimate for the second jit() that saves
only what's needed.

This leaves some dead stack space reserved for unused registers,
but since it's O(1) and relatively small I don't really care.
I think it's an easy follow-up to tighten it up.

Change-Id: I41e71e6b2baba9c0b60ffdc303c138a54ff50dab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301534
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2 files changed