Description
The DXIL ops defined in hctdb.py for Linear Algebra have no read/write restrictions applied to them. This limits the compiler's ability to perform some basic optimizations including deduplication of resource handle creation/annotation.
Steps to Reproduce
https://godbolt.org/z/a7bGebqE6
This demonstrates a Thread scope matrix being loaded twice and little more. In each case, the resource handle being loaded from is created and annotated twice.
There are various other cases where optimization opportunities like this could be lost
Description
The DXIL ops defined in hctdb.py for Linear Algebra have no read/write restrictions applied to them. This limits the compiler's ability to perform some basic optimizations including deduplication of resource handle creation/annotation.
Steps to Reproduce
https://godbolt.org/z/a7bGebqE6
This demonstrates a Thread scope matrix being loaded twice and little more. In each case, the resource handle being loaded from is created and annotated twice.
There are various other cases where optimization opportunities like this could be lost