[all-commits] [llvm/llvm-project] c9b368: [mlir][spirv] Add a pass to unify aliased resource...
Lei Zhang via All-commits
all-commits at lists.llvm.org
Thu Feb 17 06:18:36 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c9b36807beaf120f4e06d9da3b7df7625e440825
https://github.com/llvm/llvm-project/commit/c9b36807beaf120f4e06d9da3b7df7625e440825
Author: Lei Zhang <antiagainst at google.com>
Date: 2022-02-17 (Thu, 17 Feb 2022)
Changed paths:
M mlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td
M mlir/include/mlir/Dialect/SPIRV/Transforms/Passes.h
M mlir/include/mlir/Dialect/SPIRV/Transforms/Passes.td
M mlir/lib/Dialect/SPIRV/Transforms/CMakeLists.txt
A mlir/lib/Dialect/SPIRV/Transforms/UnifyAliasedResourcePass.cpp
A mlir/test/Dialect/SPIRV/Transforms/unify-aliased-resource.mlir
Log Message:
-----------
[mlir][spirv] Add a pass to unify aliased resource variables
In SPIR-V, resources are represented as global variables that
are bound to certain descriptor. SPIR-V requires those global
variables to be declared as aliased if multiple ones are bound
to the same slot. Such aliased decorations can cause issues
for transcompilers like SPIRV-Cross when converting to source
shading languages like MSL.
So this commit adds a pass to perform analysis of aliased
resources and see if we can unify them into one.
Reviewed By: ThomasRaoux
Differential Revision: https://reviews.llvm.org/D119872
More information about the All-commits
mailing list