[PATCH] D78034: [mlir][spirv] Improve stride support in array types
Denis Khalikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 13 11:18:05 PDT 2020
denis13 accepted this revision.
denis13 added a comment.
This revision is now accepted and ready to land.
LGTM! Looks more pretty than it was, thanks!
================
Comment at: mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp:548
os << "array<" << type.getNumElements() << " x " << type.getElementType();
- if (type.hasLayout()) {
- os << " [" << type.getArrayStride() << "]";
- }
+ if (unsigned stride = type.getArrayStride())
+ os << ", stride=" << type.getArrayStride();
----------------
What do you think about
```
if (!type.getArrayStride())
```
================
Comment at: mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp:555
+ os << "rtarray<" << type.getElementType();
+ if (unsigned stride = type.getArrayStride())
+ os << ", stride=" << type.getArrayStride();
----------------
What do you think about
```
if (!type.getArrayStride())
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78034/new/
https://reviews.llvm.org/D78034
More information about the llvm-commits
mailing list