[Mlir-commits] [mlir] 9dd7ed2 - [mlir] Added support for Index type inside getZeroAttr function
Jakub Lichman
llvmlistbot at llvm.org
Wed Aug 12 09:22:22 PDT 2020
Author: Jakub Lichman
Date: 2020-08-12T16:21:35Z
New Revision: 9dd7ed24bf7769262e6ea601e762792b0498647b
URL: https://github.com/llvm/llvm-project/commit/9dd7ed24bf7769262e6ea601e762792b0498647b
DIFF: https://github.com/llvm/llvm-project/commit/9dd7ed24bf7769262e6ea601e762792b0498647b.diff
LOG: [mlir] Added support for Index type inside getZeroAttr function
Differential Revision: https://reviews.llvm.org/D85833
Added:
Modified:
mlir/lib/IR/Builders.cpp
Removed:
################################################################################
diff --git a/mlir/lib/IR/Builders.cpp b/mlir/lib/IR/Builders.cpp
index 69b1a0efb58d..68c5103bd89a 100644
--- a/mlir/lib/IR/Builders.cpp
+++ b/mlir/lib/IR/Builders.cpp
@@ -274,6 +274,8 @@ Attribute Builder::getZeroAttr(Type type) {
case StandardTypes::F32:
case StandardTypes::F64:
return getFloatAttr(type, 0.0);
+ case StandardTypes::Index:
+ return getIndexAttr(0);
case StandardTypes::Integer:
return getIntegerAttr(type, APInt(type.cast<IntegerType>().getWidth(), 0));
case StandardTypes::Vector:
More information about the Mlir-commits
mailing list