Fix BufferPlacement Pass to derive from the TableGen generated parent class (NFC)
authorMehdi Amini <joker.eph@gmail.com>
Fri, 14 Aug 2020 07:55:57 +0000 (07:55 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Fri, 14 Aug 2020 08:01:47 +0000 (08:01 +0000)
mlir/include/mlir/Transforms/Passes.td
mlir/lib/Transforms/BufferPlacement.cpp

index bd905b0..7787805 100644 (file)
@@ -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
index 66d175d..4d03aff 100644 (file)
@@ -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 @@ private:
 /// 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.