SPIRV-Tools/tools
Steven Perron e935dac9ef
Make pointers to isomorphic type interchangeable with option. (#2570)
* Make pointers to logically matching types interchangeable with option.

DXC will be generating code where the function parameters will be a more
generic type that the actual parameter.  They should be logically
matching and the decorations of the actual parameter must be a superset
of the decorations of the formal parameter.

We want to accept this code with an options so that spirv-opt can then
inline and fix the type mismatch.  We will accept this under a new
options `--before-hlsl-legalization`.

The new option will also imply `relax-logical-pointer` so that HLSL
frontends will need to use just the one more generic option.

Moved the |LogicallyMatches| to the validation state to make it
available in more places.  Also added a parameter to have it check the
decorations.  I did not do a separate function for the decorations
because checking the decorations involves making sure the types
logically match anyway.

Fixes #2535
2019-05-13 13:48:17 -04:00
..
as Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
cfg Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
comp Use MakeUnique. (#1837) 2018-08-14 15:01:50 -04:00
dis Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
emacs Define variable to skip installation 2017-07-04 12:24:44 -04:00
lesspipe tools/lesspipe: Allow generic shell (#2255) 2018-12-27 15:06:37 -05:00
link Support SPIR-V 1.4 (#2550) 2019-05-07 12:27:18 -04:00
opt Make pointers to isomorphic type interchangeable with option. (#2570) 2019-05-13 13:48:17 -04:00
reduce Make pointers to isomorphic type interchangeable with option. (#2570) 2019-05-13 13:48:17 -04:00
stats Remove stats use of internal API (#1924) 2018-09-26 10:32:05 -07:00
util Validate the input to Optimizer::Run (#1799) 2018-08-08 11:16:19 -04:00
val Make pointers to isomorphic type interchangeable with option. (#2570) 2019-05-13 13:48:17 -04:00
CMakeLists.txt Add spirv-lesspipe.sh into SPIRV_SKIP_EXECUTABLES umbrella (https://github.com/KhronosGroup/SPIRV-Tools/issues/2497) (#2504) 2019-04-26 09:37:23 -04:00
io.h Rewrite include guards (#1793) 2018-08-03 08:05:33 -04:00