[Mlir-commits] [mlir] 5035d19 - Fix BufferPlacement Pass to derive from the TableGen generated parent class (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Fri Aug 14 01:02:11 PDT 2020
Author: Mehdi Amini
Date: 2020-08-14T08:01:47Z
New Revision: 5035d192faf3389bad0acf69ae69ed6b5cfe930c
URL: https://github.com/llvm/llvm-project/commit/5035d192faf3389bad0acf69ae69ed6b5cfe930c
DIFF: https://github.com/llvm/llvm-project/commit/5035d192faf3389bad0acf69ae69ed6b5cfe930c.diff
LOG: Fix BufferPlacement Pass to derive from the TableGen generated parent class (NFC)
Added:
Modified:
mlir/include/mlir/Transforms/Passes.td
mlir/lib/Transforms/BufferPlacement.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/Transforms/Passes.td b/mlir/include/mlir/Transforms/Passes.td
index bd905b0e20f6..778780573498 100644
--- a/mlir/include/mlir/Transforms/Passes.td
+++ b/mlir/include/mlir/Transforms/Passes.td
@@ -102,7 +102,7 @@ def AffinePipelineDataTransfer
let constructor = "mlir::createPipelineDataTransferPass()";
}
-def BufferPlacement : Pass<"buffer-placement"> {
+def BufferPlacement : FunctionPass<"buffer-placement"> {
let summary = "Optimizes placement of alloc and dealloc operations";
let description = [{
This pass implements an algorithm to optimize the placement of alloc and
diff --git a/mlir/lib/Transforms/BufferPlacement.cpp b/mlir/lib/Transforms/BufferPlacement.cpp
index 66d175dc1f3e..4d03affc2d4d 100644
--- a/mlir/lib/Transforms/BufferPlacement.cpp
+++ b/mlir/lib/Transforms/BufferPlacement.cpp
@@ -1,3 +1,4 @@
+
//===- BufferPlacement.cpp - the impl for buffer placement ---------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
@@ -57,6 +58,7 @@
//===----------------------------------------------------------------------===//
#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"
@@ -669,8 +671,7 @@ class BufferPlacement {
/// The actual buffer placement pass that moves alloc and dealloc nodes into
/// the right positions. It uses the algorithm described at the top of the
/// file.
-struct BufferPlacementPass
- : mlir::PassWrapper<BufferPlacementPass, FunctionPass> {
+struct BufferPlacementPass : BufferPlacementBase<BufferPlacementPass> {
void runOnFunction() override {
// Place all required alloc, copy and dealloc nodes.
More information about the Mlir-commits
mailing list