HomePhabricator

[MLIR][SPIRVToLLVM] SPIR-V types size in bytes function

Authored by georgemitenkov on Jul 9 2020, 7:20 AM.

Description

[MLIR][SPIRVToLLVM] SPIR-V types size in bytes function

Added getSizeInBytes() function as a class member to several SPIR-V types:
ScalarType, ArrayType and VectorType. This function aims at exposing
the functionality of getTypeNumBytes() from SPIRVLowering.cpp. Support
of more types will be added on demand.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D83285