skia2/tests/sksl/spirv
John Stiles ffc9dec755 Eliminate redundant loads following stores.
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>
2022-04-18 14:57:48 +00:00
..
ConstantVectorFromVector.asm.frag
ConstantVectorize.asm.frag Eliminate redundant loads following stores. 2022-04-18 14:57:48 +00:00
InterfaceBlockPushConstant.asm.frag Roll SPIRV-Headers and SPIRV-Tools 2021-11-19 19:22:54 +00:00
LayoutMultipleOf4.asm.frag Added range highlighting to SkSL error reports 2022-04-07 13:29:48 +00:00
LayoutOutOfOrder.asm.frag Added range highlighting to SkSL error reports 2022-04-07 13:29:48 +00:00
OpaqueTypeInArray.asm.frag Added range highlighting to SkSL error reports 2022-04-07 13:29:48 +00:00
Ossfuzz35916.asm.frag
Ossfuzz37627.asm.frag [sksl] Special-case unary negation on matrix types in MSL/SPIR-V 2022-03-01 20:14:46 +00:00
Ossfuzz44096.asm.frag Added range highlighting to SkSL error reports 2022-04-07 13:29:48 +00:00
UnusedInterfaceBlock.asm.frag Update vulkan validation errors in generated files 2022-04-14 15:09:37 +00:00