/* Autogenerated by mlir-tblgen; don't manually edit */
#ifdef GEN_PASS_CLASSES

//===----------------------------------------------------------------------===//
// CodeGenRewrite
//===----------------------------------------------------------------------===//

template <typename DerivedT>
class CodeGenRewriteBase : public ::mlir::OperationPass<> {
public:
  using Base = CodeGenRewriteBase;

  CodeGenRewriteBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
  CodeGenRewriteBase(const CodeGenRewriteBase &other) : ::mlir::OperationPass<>(other) {}

  /// Returns the command-line argument attached to this pass.
  static constexpr ::llvm::StringLiteral getArgumentName() {
    return ::llvm::StringLiteral("cg-rewrite");
  }
  ::llvm::StringRef getArgument() const override { return "cg-rewrite"; }

  ::llvm::StringRef getDescription() const override { return "Rewrite some FIR ops into their code-gen forms."; }

  /// Returns the derived pass name.
  static constexpr ::llvm::StringLiteral getPassName() {
    return ::llvm::StringLiteral("CodeGenRewrite");
  }
  ::llvm::StringRef getName() const override { return "CodeGenRewrite"; }

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    
  registry.insert<fir::FIROpsDialect>();

  registry.insert<fir::FIRCodeGenDialect>();

  registry.insert<mlir::BuiltinDialect>();

  registry.insert<mlir::LLVM::LLVMDialect>();

  registry.insert<mlir::omp::OpenMPDialect>();

  }

protected:
  ::mlir::Pass::Statistic numDCE{this, "num-dce'd", "Number of operations eliminated"};
};
#undef GEN_PASS_CLASSES
#endif // GEN_PASS_CLASSES
#ifdef GEN_PASS_REGISTRATION

//===----------------------------------------------------------------------===//
// CodeGenRewrite Registration
//===----------------------------------------------------------------------===//

inline void registerCodeGenRewritePass() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return fir::createFirCodeGenRewritePass();
  });
}

//===----------------------------------------------------------------------===//
// OptCodeGen Registration
//===----------------------------------------------------------------------===//

inline void registerOptCodeGenPasses() {
  registerCodeGenRewritePass();
}
#undef GEN_PASS_REGISTRATION
#endif // GEN_PASS_REGISTRATION
