[Mlir-commits] [mlir] 52698a3 - [mlir][bufferization] Clean up imports and code comments

Matthias Springer llvmlistbot at llvm.org
Wed May 25 20:49:04 PDT 2022


Author: Matthias Springer
Date: 2022-05-26T05:48:52+02:00
New Revision: 52698a33d03118f684f0f92380e107b9049ec206

URL: https://github.com/llvm/llvm-project/commit/52698a33d03118f684f0f92380e107b9049ec206
DIFF: https://github.com/llvm/llvm-project/commit/52698a33d03118f684f0f92380e107b9049ec206.diff

LOG: [mlir][bufferization] Clean up imports and code comments

Differential Revision: https://reviews.llvm.org/D126427

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
    mlir/include/mlir/Dialect/Bufferization/Transforms/Bufferize.h
    mlir/include/mlir/Dialect/Bufferization/Transforms/OneShotAnalysis.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h b/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
index 9d3acb3ca0e4..eb3cff0722b0 100644
--- a/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
+++ b/mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
@@ -9,20 +9,13 @@
 #ifndef MLIR_DIALECT_BUFFERIZATION_IR_BUFFERIZABLEOPINTERFACE_H_
 #define MLIR_DIALECT_BUFFERIZATION_IR_BUFFERIZABLEOPINTERFACE_H_
 
-#include <utility>
-
-#include "mlir/IR/BlockAndValueMapping.h"
-#include "mlir/IR/Builders.h"
-#include "mlir/IR/BuiltinOps.h"
-#include "mlir/IR/BuiltinTypes.h"
 #include "mlir/IR/Operation.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Support/LLVM.h"
 #include "llvm/ADT/SetVector.h"
 
 namespace mlir {
-class BlockAndValueMapping;
-class DominanceInfo;
+class OpBuilder;
 
 namespace bufferization {
 

diff  --git a/mlir/include/mlir/Dialect/Bufferization/Transforms/Bufferize.h b/mlir/include/mlir/Dialect/Bufferization/Transforms/Bufferize.h
index 9dc2e96d2f22..94fc36a7387c 100644
--- a/mlir/include/mlir/Dialect/Bufferization/Transforms/Bufferize.h
+++ b/mlir/include/mlir/Dialect/Bufferization/Transforms/Bufferize.h
@@ -1,4 +1,4 @@
-//===- Bufferize.h - Bufferization utilities --------------------*- C++ -*-===//
+//===- Bufferize.h - Bufferization Utilities --------------------*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -9,14 +9,10 @@
 // We use the term "bufferize" to mean conversion from tensor types to
 // memref types.
 //
-// Generally speaking, for each op that operates on tensor types, a conversion
-// pattern needs to be written. The infrastructure in this file assists in
-// defining these conversion patterns in a composable way.
-//
-// Bufferization conversion patterns should generally use the ordinary
-// conversion pattern classes (e.g. OpConversionPattern). A TypeConverter
-// (accessible with getTypeConverter()) is available if needed for converting
-// types.
+// Generally speaking, for each op that operates on tensor types, the
+// `BufferizableOpInterface` needs to be implemented. This file contains the
+// bufferization driver that is responsible for bufferizing the ops in the right
+// order, etc.
 //
 //===----------------------------------------------------------------------===//
 

diff  --git a/mlir/include/mlir/Dialect/Bufferization/Transforms/OneShotAnalysis.h b/mlir/include/mlir/Dialect/Bufferization/Transforms/OneShotAnalysis.h
index 22a7e0c402ba..ae2ca6eeccbc 100644
--- a/mlir/include/mlir/Dialect/Bufferization/Transforms/OneShotAnalysis.h
+++ b/mlir/include/mlir/Dialect/Bufferization/Transforms/OneShotAnalysis.h
@@ -10,7 +10,6 @@
 #define MLIR_DIALECT_BUFFERIZATION_TRANSFORMS_ONESHOTANALYSIS_H
 
 #include "mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h"
-#include "mlir/IR/BuiltinOps.h"
 #include "llvm/ADT/EquivalenceClasses.h"
 
 namespace mlir {


        


More information about the Mlir-commits mailing list