[mlir] Add value_begin/value_end methods to DenseElementsAttr
authorRiver Riddle <riddleriver@gmail.com>
Tue, 21 Sep 2021 01:40:22 +0000 (01:40 +0000)
committerRiver Riddle <riddleriver@gmail.com>
Tue, 21 Sep 2021 01:57:43 +0000 (01:57 +0000)
commit0cb5d7fc7fd3eeb40b6ecf9b34a497d46bcba6c6
tree5c837503ed9d324409a7475c82371066d19e4e84
parent4f21152af12b21ea8f04b322a29dc6ad9e79ef16
[mlir] Add value_begin/value_end methods to DenseElementsAttr

Currently DenseElementsAttr only exposes the ability to get the full range of values for a given type T, but there are many situations where we just want the beginning/end iterator. This revision adds proper value_begin/value_end methods for all of the supported T types, and also cleans up a bit of the interface.

Differential Revision: https://reviews.llvm.org/D104173
18 files changed:
mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
mlir/include/mlir/Dialect/CommonFolders.h
mlir/include/mlir/IR/BuiltinAttributes.h
mlir/include/mlir/IR/BuiltinAttributes.td
mlir/lib/CAPI/IR/BuiltinAttributes.cpp
mlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRV.cpp
mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.cpp
mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
mlir/lib/IR/AsmPrinter.cpp
mlir/lib/IR/BuiltinAttributes.cpp
mlir/lib/IR/Operation.cpp
mlir/lib/Interfaces/InferTypeOpInterface.cpp
mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
mlir/unittests/TableGen/StructsGenTest.cpp