Optimize zero-splats inside of loops in SkVMCodeGenerator.
Previously, we had various loops which would synthesize a `splat(0)`
instruction on every iteration of the loop. This was harmless and was
already deduplicated by SkVM internally, but in a long loop, this
deduplication process could occur many many times in a row. This hurts
performance needlessly. In particular, for-loops can run for thousands
of iterations in a row, so the savings here can be substantial.
This was inspired by investigation into oss-fuzz:37837.
Commit-Queue: John Stiles <email@example.com>
Commit-Queue: Brian Osman <firstname.lastname@example.org>
Auto-Submit: John Stiles <email@example.com>
Reviewed-by: Brian Osman <firstname.lastname@example.org>
1 file changed