[Mlir-commits] [mlir] 2c8a77a - [mlir] Move duplicated BufferizableOpInterface::kBufferLayoutAttrName defs to a single place
Benjamin Kramer
llvmlistbot at llvm.org
Tue Jan 25 06:21:32 PST 2022
Author: Benjamin Kramer
Date: 2022-01-25T15:20:30+01:00
New Revision: 2c8a77ab21ff3a41829a5d67e0b838cc7a9f5f21
URL: https://github.com/llvm/llvm-project/commit/2c8a77ab21ff3a41829a5d67e0b838cc7a9f5f21
DIFF: https://github.com/llvm/llvm-project/commit/2c8a77ab21ff3a41829a5d67e0b838cc7a9f5f21.diff
LOG: [mlir] Move duplicated BufferizableOpInterface::kBufferLayoutAttrName defs to a single place
Added:
Modified:
mlir/lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp
mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp
mlir/lib/Dialect/Linalg/IR/LinalgDialect.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp b/mlir/lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp
index 9cb99db16d6a7..7d91229625cca 100644
--- a/mlir/lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp
+++ b/mlir/lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp
@@ -32,6 +32,16 @@ namespace bufferization {
using namespace mlir;
using namespace bufferization;
+/// Attribute name used to mark the bufferization layout for region
+/// arguments during linalg comprehensive bufferization.
+constexpr const ::llvm::StringLiteral
+ bufferization::BufferizableOpInterface::kBufferLayoutAttrName;
+
+/// Attribute name used to mark region arguments that can be bufferized
+/// in-place during linalg comprehensive bufferization.
+constexpr const ::llvm::StringLiteral
+ bufferization::BufferizableOpInterface::kInplaceableAttrName;
+
//===----------------------------------------------------------------------===//
// BufferizationOptions
//===----------------------------------------------------------------------===//
diff --git a/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp b/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp
index e5eac1fb2765d..0fe79862a69d0 100644
--- a/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp
+++ b/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp
@@ -85,16 +85,6 @@ using namespace tensor;
using namespace comprehensive_bufferize;
using namespace mlir::bufferization;
-/// Attribute name used to mark the bufferization layout for region
-/// arguments during linalg comprehensive bufferization.
-constexpr const ::llvm::StringLiteral
- bufferization::BufferizableOpInterface::kBufferLayoutAttrName;
-
-/// Attribute name used to mark region arguments that can be bufferized
-/// in-place during linalg comprehensive bufferization.
-constexpr const ::llvm::StringLiteral
- bufferization::BufferizableOpInterface::kInplaceableAttrName;
-
namespace {
/// The state of analysis of a FuncOp.
enum class FuncOpAnalysisState { NotAnalyzed, InProgress, Analyzed };
diff --git a/mlir/lib/Dialect/Linalg/IR/LinalgDialect.cpp b/mlir/lib/Dialect/Linalg/IR/LinalgDialect.cpp
index ccab0bbd6cb2c..623dd5085363d 100644
--- a/mlir/lib/Dialect/Linalg/IR/LinalgDialect.cpp
+++ b/mlir/lib/Dialect/Linalg/IR/LinalgDialect.cpp
@@ -62,16 +62,6 @@ struct LinalgInlinerInterface : public DialectInlinerInterface {
constexpr const ::llvm::StringLiteral
LinalgDialect::kMemoizedIndexingMapsAttrName;
-/// Attribute name used to mark the bufferization layout for region
-/// arguments during linalg comprehensive bufferization.
-constexpr const ::llvm::StringLiteral
- bufferization::BufferizableOpInterface::kBufferLayoutAttrName;
-
-/// Attribute name used to mark region arguments that can be bufferized
-/// in-place during linalg comprehensive bufferization.
-constexpr const ::llvm::StringLiteral
- bufferization::BufferizableOpInterface::kInplaceableAttrName;
-
/// Trait to check if T provides a `regionBuilder` method.
template <typename T, typename... Args>
using has_region_builder = decltype(T::regionBuilder);
More information about the Mlir-commits
mailing list