[PATCH] D75883: Add Builder::getI64VectorAttr.
Sean Silva via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 13 15:08:10 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG94f848d7b569: Add Builder::getI64VectorAttr. (authored by silvas).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75883/new/
https://reviews.llvm.org/D75883
Files:
mlir/include/mlir/IR/Builders.h
mlir/lib/IR/Builders.cpp
Index: mlir/lib/IR/Builders.cpp
===================================================================
--- mlir/lib/IR/Builders.cpp
+++ mlir/lib/IR/Builders.cpp
@@ -98,11 +98,15 @@
}
DenseIntElementsAttr Builder::getI32VectorAttr(ArrayRef<int32_t> values) {
- return DenseElementsAttr::get(
- VectorType::get(static_cast<int64_t>(values.size()),
- getIntegerType(32)),
- values)
- .cast<DenseIntElementsAttr>();
+ return DenseIntElementsAttr::get(
+ VectorType::get(static_cast<int64_t>(values.size()), getIntegerType(32)),
+ values);
+}
+
+DenseIntElementsAttr Builder::getI64VectorAttr(ArrayRef<int64_t> values) {
+ return DenseIntElementsAttr::get(
+ VectorType::get(static_cast<int64_t>(values.size()), getIntegerType(64)),
+ values);
}
IntegerAttr Builder::getI32IntegerAttr(int32_t value) {
Index: mlir/include/mlir/IR/Builders.h
===================================================================
--- mlir/include/mlir/IR/Builders.h
+++ mlir/include/mlir/IR/Builders.h
@@ -117,6 +117,7 @@
IntegerAttr getUI32IntegerAttr(uint32_t value);
DenseIntElementsAttr getI32VectorAttr(ArrayRef<int32_t> values);
+ DenseIntElementsAttr getI64VectorAttr(ArrayRef<int64_t> values);
ArrayAttr getAffineMapArrayAttr(ArrayRef<AffineMap> values);
ArrayAttr getI32ArrayAttr(ArrayRef<int32_t> values);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75883.250314.patch
Type: text/x-patch
Size: 1392 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200313/eefd3d47/attachment.bin>
More information about the llvm-commits
mailing list