0f61c12737
Most hoisted values are used in the loop body (and that's really the whole point of hoisting) but some are just temporaries to help produce other hoisted values. This used_in_loop bit helps us distinguish the two, and lets us recycle registers holding temporary hoisted values not used in the loop. The can-we-recycle logic now becomes: - is this a real value? - is it time for it to die? - is it either not hoisted or a hoisted temporary? The set-death-to-infinity approach for hoisted values is now gone. That worked great for hoisted values used inside the loop, but was too conservative for hoisted temporaries. This lifetime extension was preventing us from recycling those registers, pinning enough registers that we run out and fail to JIT. Small amounts of refactoring to make this clearer: - move the Instruction hash function definition near its operator== - rename the two "hoist" variables to "can_hoist" for Instructions and "try_hoisting" for the JIT approach - add ↟ to mark hoisted temporaries, _really_ hoisted values. There's some redundancy here between tracking the can_hoist bit, the used_in_loop bit, and lifetime tracking. I think it should be true, for instance, that !can_hoist && !used_in_loop implies an instruction is dead code. I plan to continue refactoring lifetime analysis (in particular reordering instructions to decrease register pressure) so hopefully by the time I'm done that metadata will shake out a little crisper. Change-Id: I6460ca96d1cbec0315bed3c9a0774cd88ab5be26 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248986 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Herb Derby <herb@google.com> |
||
---|---|---|
.. | ||
android_fonts | ||
empty_images | ||
fonts | ||
icc_profiles | ||
images | ||
invalid_images | ||
lua | ||
nima | ||
particles | ||
skottie | ||
text | ||
Cowboy.svg | ||
crbug769134.fil | ||
nov-talk-sequence.txt | ||
pdf_command_stream.txt | ||
README | ||
SkVMTest.expected |
The resources directory includes some third party content used by Skia. Licenses for that code are included in this file. Openclipart Openclipart uses the Creative Commons Zero 1.0 Public Domain License every time an artist uploads a piece of clipart to Openclipart to make it clear the artist is releasing the creative work for anyone to use for any reason, even commercially. This act of "sharing" is the foundation Openclipart is based upon. More details on the license can be found at https://creativecommons.org/publicdomain/zero/1.0/. LGPL or compatible (as implied by inclusion in KDE SVN) http://websvn.kde.org/trunk/tests/ksvgtests/custom/cowboy.svg