This allow declaring buffers and alloc of vectors so that we can support vector load/store.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp | ||
---|---|---|
353–363 | Maybe we can have something like Type elementType = type.getElementType(); Type arrayElemType = nullptr; if (auto vecType = dyn_cast<VectorType>(elementType)) { arrayElementType = ... } else if (auto scalarType = ...) { arrayElementType = ... } else { return llvm::None } ? | |
357 | double negative is confusing. Maybe say "illegal: can convert memrefs of either scalar or vector element type only" Though I dont know why these are "illegal". It should be "unhandled" |
mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp | ||
---|---|---|
357 | Sure, I rephrased it. |
mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp | ||
---|---|---|
353–363 | convertScalarType and convertVectorType return Optional<Type> so I would need extra handling if I don't use Optional<>. I think that's the most natural way to do it? What do you think? |
mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp | ||
---|---|---|
353–363 | I didnt realize that. Then this is fine. Sorry for the noise. |
double negative is confusing. Maybe say
"illegal: can convert memrefs of either scalar or vector element type only"
Though I dont know why these are "illegal". It should be "unhandled"