[MLIR][SPIRV] Use getAsmResultName(...) hook for ConstantOp.
authorKareemErgawy <kareem.ergawy@tomtom.com>
Fri, 28 May 2021 06:49:45 +0000 (08:49 +0200)
committerKareemErgawy <kareem.ergawy@tomtom.com>
Fri, 28 May 2021 07:28:02 +0000 (09:28 +0200)
commite493abcf55a35812d15e16477958baa4bdc92707
tree5984210a4030632fd9b7534ca1ee2c6ca193cb36
parentffc4d3e06855550a8bd2a691f6d05828d5bf4ddf
[MLIR][SPIRV] Use getAsmResultName(...) hook for ConstantOp.

Implements better naming for results of `spv.Constant` ops by making it
inherit from OpAsmOpInterface and implementing the associated
getAsmResultName(...) hook.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D103152
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVOps.h
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td
mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
mlir/test/Dialect/SPIRV/IR/asm-op-interface.mlir [new file with mode: 0644]
mlir/test/Dialect/SPIRV/IR/memory-ops.mlir