OSDN Git Service

[MLIR][SPIRV] Add `UsableInSpecConstantOp` trait.
authorKareemErgawy-TomTom <kareem.ergawy@gmail.com>
Fri, 8 Jan 2021 13:48:48 +0000 (14:48 +0100)
committerKareemErgawy-TomTom <kareem.ergawy@gmail.com>
Fri, 8 Jan 2021 14:07:40 +0000 (15:07 +0100)
commit25d882e758cc9af5de12d8a118cb6eecad14d316
tree52da0e5e53c6313955f3ddaec09a9c1c7d474291
parent5ead757f1d89898941f0e10f71f382aaf36d174b
[MLIR][SPIRV] Add `UsableInSpecConstantOp` trait.

Instead of checking explicitly checking for whether an op is usalbe
inside a `SpecConstantOperationOP`, this commit adds a new trait to
filter such ops.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D94288
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVArithmeticOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBitOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCastOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCompositeOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVLogicalOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVOpTraits.h
mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp