[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:06 PDT 2020
denis13 added inline comments.
================
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();
----------------
denis13 wrote:
> What do you think about
>
> ```
> if (!type.getArrayStride())
> ```
Sorry, I meant
```
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();
----------------
denis13 wrote:
> What do you think about
>
> ```
> if (!type.getArrayStride())
> ```
Sorry I meant
```
if (type.getArrayStide())
```
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