[mlir][spirv] Add target control to UnifyAliasedResourcePass
authorLei Zhang <antiagainst@google.com>
Thu, 27 Oct 2022 18:31:21 +0000 (14:31 -0400)
committerLei Zhang <antiagainst@google.com>
Thu, 27 Oct 2022 18:36:07 +0000 (14:36 -0400)
commit7841f557ea3df1987ceb1c033e458790f5828795
tree9b8207aa19583709bc540ca437d173737ba0fc9d
parentdad64448c66975054d3d968232652a56eb93b451
[mlir][spirv] Add target control to UnifyAliasedResourcePass

The UnifyAliasedResourcePass is actually only necessary for
targeting Apple GPUs via MoltenVK, where we need to translate
SPIR-V into MSL. The translation has limitations--no support
of aliased resources. So introducing a control to disable
this pass if targeting other platforms.

Reviewed By: kuhar

Differential Revision: https://reviews.llvm.org/D136869
mlir/include/mlir/Dialect/SPIRV/Transforms/Passes.h
mlir/lib/Dialect/SPIRV/Transforms/UnifyAliasedResourcePass.cpp