[Mlir-commits] [mlir] 54bd8bb - [mlir] Add accessor methods for I[2|4|16] types to Builder.
Hendrik Greving
llvmlistbot at llvm.org
Wed Sep 14 09:07:21 PDT 2022
Author: Eman Copty
Date: 2022-09-14T09:06:00-07:00
New Revision: 54bd8bb4520c6685ec4d3c99b4d48b56be0095e9
URL: https://github.com/llvm/llvm-project/commit/54bd8bb4520c6685ec4d3c99b4d48b56be0095e9
DIFF: https://github.com/llvm/llvm-project/commit/54bd8bb4520c6685ec4d3c99b4d48b56be0095e9.diff
LOG: [mlir] Add accessor methods for I[2|4|16] types to Builder.
Adds the accessor methods for I[2|4|16] types to the Builder.
Differential Revision: https://reviews.llvm.org/D133793
Added:
Modified:
mlir/include/mlir/IR/Builders.h
mlir/lib/IR/Builders.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/IR/Builders.h b/mlir/include/mlir/IR/Builders.h
index 9fa683a92e47d..a10503c72735a 100644
--- a/mlir/include/mlir/IR/Builders.h
+++ b/mlir/include/mlir/IR/Builders.h
@@ -69,7 +69,10 @@ class Builder {
IndexType getIndexType();
IntegerType getI1Type();
+ IntegerType getI2Type();
+ IntegerType getI4Type();
IntegerType getI8Type();
+ IntegerType getI16Type();
IntegerType getI32Type();
IntegerType getI64Type();
IntegerType getIntegerType(unsigned width);
diff --git a/mlir/lib/IR/Builders.cpp b/mlir/lib/IR/Builders.cpp
index 50f84a6998222..8bd3c72d185f1 100644
--- a/mlir/lib/IR/Builders.cpp
+++ b/mlir/lib/IR/Builders.cpp
@@ -49,8 +49,14 @@ IndexType Builder::getIndexType() { return IndexType::get(context); }
IntegerType Builder::getI1Type() { return IntegerType::get(context, 1); }
+IntegerType Builder::getI2Type() { return IntegerType::get(context, 2); }
+
+IntegerType Builder::getI4Type() { return IntegerType::get(context, 4); }
+
IntegerType Builder::getI8Type() { return IntegerType::get(context, 8); }
+IntegerType Builder::getI16Type() { return IntegerType::get(context, 16); }
+
IntegerType Builder::getI32Type() { return IntegerType::get(context, 32); }
IntegerType Builder::getI64Type() { return IntegerType::get(context, 64); }
More information about the Mlir-commits
mailing list