diff --git a/mlir/include/mlir/Transforms/BufferPlacement.h b/mlir/include/mlir/Transforms/Bufferize.h rename from mlir/include/mlir/Transforms/BufferPlacement.h rename to mlir/include/mlir/Transforms/Bufferize.h --- a/mlir/include/mlir/Transforms/BufferPlacement.h +++ b/mlir/include/mlir/Transforms/Bufferize.h @@ -1,4 +1,4 @@ -//===- BufferPlacement.h - Buffer Assignment 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. @@ -6,13 +6,17 @@ // //===----------------------------------------------------------------------===// // -// This header file defines buffer assignment helper methods to compute correct -// and valid positions for placing Alloc and Dealloc operations. +// 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. // //===----------------------------------------------------------------------===// -#ifndef MLIR_TRANSFORMS_BUFFERPLACEMENT_H -#define MLIR_TRANSFORMS_BUFFERPLACEMENT_H +#ifndef MLIR_TRANSFORMS_BUFFERIZE_H +#define MLIR_TRANSFORMS_BUFFERIZE_H #include "mlir/Analysis/Liveness.h" #include "mlir/Dialect/StandardOps/IR/Ops.h" @@ -256,4 +260,4 @@ } } // end namespace mlir -#endif // MLIR_TRANSFORMS_BUFFERPLACEMENT_H +#endif // MLIR_TRANSFORMS_BUFFERIZE_H diff --git a/mlir/lib/Dialect/Linalg/Transforms/TensorsToBuffers.cpp b/mlir/lib/Dialect/Linalg/Transforms/TensorsToBuffers.cpp --- a/mlir/lib/Dialect/Linalg/Transforms/TensorsToBuffers.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/TensorsToBuffers.cpp @@ -17,7 +17,7 @@ #include "mlir/IR/Function.h" #include "mlir/IR/Operation.h" #include "mlir/Pass/Pass.h" -#include "mlir/Transforms/BufferPlacement.h" +#include "mlir/Transforms/Bufferize.h" using namespace mlir; diff --git a/mlir/lib/Dialect/Shape/Transforms/ShapeTypeConversion.cpp b/mlir/lib/Dialect/Shape/Transforms/ShapeTypeConversion.cpp --- a/mlir/lib/Dialect/Shape/Transforms/ShapeTypeConversion.cpp +++ b/mlir/lib/Dialect/Shape/Transforms/ShapeTypeConversion.cpp @@ -18,7 +18,7 @@ #include "mlir/IR/Operation.h" #include "mlir/IR/StandardTypes.h" #include "mlir/Pass/Pass.h" -#include "mlir/Transforms/BufferPlacement.h" +#include "mlir/Transforms/Bufferize.h" using namespace mlir; using namespace mlir::shape; diff --git a/mlir/lib/Transforms/BufferPlacement.cpp b/mlir/lib/Transforms/BufferPlacement.cpp --- a/mlir/lib/Transforms/BufferPlacement.cpp +++ b/mlir/lib/Transforms/BufferPlacement.cpp @@ -55,11 +55,11 @@ // //===----------------------------------------------------------------------===// -#include "mlir/Transforms/BufferPlacement.h" #include "PassDetail.h" #include "mlir/Dialect/Linalg/IR/LinalgOps.h" #include "mlir/IR/Operation.h" #include "mlir/Pass/Pass.h" +#include "mlir/Transforms/Bufferize.h" #include "mlir/Transforms/Passes.h" #include "llvm/ADT/SetOperations.h" diff --git a/mlir/test/lib/Transforms/TestBufferPlacement.cpp b/mlir/test/lib/Transforms/TestBufferPlacement.cpp --- a/mlir/test/lib/Transforms/TestBufferPlacement.cpp +++ b/mlir/test/lib/Transforms/TestBufferPlacement.cpp @@ -18,7 +18,7 @@ #include "mlir/IR/Operation.h" #include "mlir/Pass/Pass.h" #include "mlir/Pass/PassManager.h" -#include "mlir/Transforms/BufferPlacement.h" +#include "mlir/Transforms/Bufferize.h" using namespace mlir;