[mlir][Pass] Update the PassGen to generate base classes instead of utilities
Summary:
This is much cleaner, and fits the same structure as many other tablegen backends. This was not done originally as the CRTP in the pass classes made it overly verbose/complex.
Differential Revision: https://reviews.llvm.org/D77367
diff --git a/mlir/lib/Transforms/SymbolDCE.cpp b/mlir/lib/Transforms/SymbolDCE.cpp
index 251a956..581857a6 100644
--- a/mlir/lib/Transforms/SymbolDCE.cpp
+++ b/mlir/lib/Transforms/SymbolDCE.cpp
@@ -11,17 +11,13 @@
//
//===----------------------------------------------------------------------===//
-#include "mlir/Pass/Pass.h"
+#include "PassDetail.h"
#include "mlir/Transforms/Passes.h"
using namespace mlir;
namespace {
-struct SymbolDCE : public PassWrapper<SymbolDCE, OperationPass<>> {
-/// Include the generated pass utilities.
-#define GEN_PASS_SymbolDCE
-#include "mlir/Transforms/Passes.h.inc"
-
+struct SymbolDCE : public SymbolDCEBase<SymbolDCE> {
void runOnOperation() override;
/// Compute the liveness of the symbols within the given symbol table.