Improve the constant import to handle zeroinitializer as well as
additional float types such as quad floats. The logic got restructured
to avoid creating intermediate dense element attributes when
constructing multi-dimensional arrays. Additionally, we also leverage
the fact that we do not need to iterate all elements of splat constants.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM, modulo comments.
mlir/lib/Target/LLVMIR/ModuleImport.cpp | ||
---|---|---|
630 | It seems that all users of this function essentially use it to check if something is a scalar type or not. Can we not just return a boolean and rename this to isScalarType? | |
675 | It's a bit sad that this function internally copies the vector or does not use it at all. On the other hand, moving a SmallVector might also not be worth it. | |
732 | NIT: Is the capturing really required? |
It seems that all users of this function essentially use it to check if something is a scalar type or not. Can we not just return a boolean and rename this to isScalarType?