ffc9dec755
We now have two functions `writeOpLoad` and `writeOpStore` which are in charge of writing SpvOpLoad and SpvOpStore instructions. `writeOpStore` also keeps track of pointer stores in a "store cache." Subsequent loads from that same pointer will be found in the cache and will return the value stored in that pointer instead. Such a cache definitely cannot work in the face of control flow, so we make the following concessions: - `pruneReachableOps` is now `pruneConditionalOps`. Any pointers that are altered inside a potentially-unreachable block are cleared from the cache entirely. - The entire store cache is cleared at all OpLabels within a loop. The cache also cannot work in the presence of swizzled stores, so we make another significant concession: - The entire store cache is cleared whenever we store into a non-memory pointer (e.g., assigning into a swizzled LValue, such as `foo.xz`). Despite these significant limitations, this manages to dramatically shrink many real-world examples. Change-Id: I0981a0cf7b45b064e153e9ada271494c8e00cad5 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530054 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> |
||
---|---|---|
.. | ||
ConstantVectorFromVector.asm.frag | ||
ConstantVectorize.asm.frag | ||
InterfaceBlockPushConstant.asm.frag | ||
LayoutMultipleOf4.asm.frag | ||
LayoutOutOfOrder.asm.frag | ||
OpaqueTypeInArray.asm.frag | ||
Ossfuzz35916.asm.frag | ||
Ossfuzz37627.asm.frag | ||
Ossfuzz44096.asm.frag | ||
UnusedInterfaceBlock.asm.frag |