llvm/tools/mlir/include/mlir/Dialect/OpenACC/Transforms/Passes.h.inc

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

#ifdef GEN_PASS_DECL
// Generate declarations for all passes.
#define GEN_PASS_DECL_LEGALIZEDATAINREGION
#undef GEN_PASS_DECL
#endif // GEN_PASS_DECL

//===----------------------------------------------------------------------===//
// LegalizeDataInRegion
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_LEGALIZEDATAINREGION
struct LegalizeDataInRegionOptions {};
#undef GEN_PASS_DECL_LEGALIZEDATAINREGION
#endif // GEN_PASS_DECL_LEGALIZEDATAINREGION
#ifdef GEN_PASS_DEF_LEGALIZEDATAINREGION
namespace impl {

template <typename DerivedT>
class LegalizeDataInRegionBase : public ::mlir::OperationPass<mlir::func::FuncOp> {
public:
  using Base = LegalizeDataInRegionBase;

  LegalizeDataInRegionBase() : ::mlir::OperationPass<mlir::func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeDataInRegionBase(const LegalizeDataInRegionBase &other) : ::mlir::OperationPass<mlir::func::FuncOp>(other) {}
  LegalizeDataInRegionBase& operator=(const LegalizeDataInRegionBase &) = delete;
  LegalizeDataInRegionBase(LegalizeDataInRegionBase &&) = delete;
  LegalizeDataInRegionBase& operator=(LegalizeDataInRegionBase &&) = delete;
  ~LegalizeDataInRegionBase() = default;

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

  ::llvm::StringRef getDescription() const override { return "Legalize the data in the compute region"; }

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

  /// 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 {
    
  }

  /// Explicitly declare the TypeID for this class. We declare an explicit private
  /// instantiation because Pass classes should only be visible by the current
  /// library.
  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(LegalizeDataInRegionBase<DerivedT>)

  LegalizeDataInRegionBase(LegalizeDataInRegionOptions options) : LegalizeDataInRegionBase() {
    hostToDevice = std::move(options.hostToDevice);
  }
protected:
  ::mlir::Pass::Option<bool> hostToDevice{*this, "host-to-device", ::llvm::cl::desc("Replace varPtr uses with accPtr if true. Replace accPtr uses with varPtr if false"), ::llvm::cl::init(true)};
private:
};
} // namespace impl
#undef GEN_PASS_DEF_LEGALIZEDATAINREGION
#endif // GEN_PASS_DEF_LEGALIZEDATAINREGION
#ifdef GEN_PASS_REGISTRATION

//===----------------------------------------------------------------------===//
// LegalizeDataInRegion Registration
//===----------------------------------------------------------------------===//

inline void registerLegalizeDataInRegion() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return ::mlir::acc::createLegalizeDataInRegion();
  });
}

// Old registration code, kept for temporary backwards compatibility.
inline void registerLegalizeDataInRegionPass() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return ::mlir::acc::createLegalizeDataInRegion();
  });
}

//===----------------------------------------------------------------------===//
// OpenACC Registration
//===----------------------------------------------------------------------===//

inline void registerOpenACCPasses() {
  registerLegalizeDataInRegion();
}
#undef GEN_PASS_REGISTRATION
#endif // GEN_PASS_REGISTRATION
// Deprecated. Please use the new per-pass macros.
#ifdef GEN_PASS_CLASSES

template <typename DerivedT>
class LegalizeDataInRegionBase : public ::mlir::OperationPass<mlir::func::FuncOp> {
public:
  using Base = LegalizeDataInRegionBase;

  LegalizeDataInRegionBase() : ::mlir::OperationPass<mlir::func::FuncOp>(::mlir::TypeID::get<DerivedT>()) {}
  LegalizeDataInRegionBase(const LegalizeDataInRegionBase &other) : ::mlir::OperationPass<mlir::func::FuncOp>(other) {}
  LegalizeDataInRegionBase& operator=(const LegalizeDataInRegionBase &) = delete;
  LegalizeDataInRegionBase(LegalizeDataInRegionBase &&) = delete;
  LegalizeDataInRegionBase& operator=(LegalizeDataInRegionBase &&) = delete;
  ~LegalizeDataInRegionBase() = default;

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

  ::llvm::StringRef getDescription() const override { return "Legalize the data in the compute region"; }

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

  /// 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));
  }

  /// Register the dialects that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    
  }

  /// Explicitly declare the TypeID for this class. We declare an explicit private
  /// instantiation because Pass classes should only be visible by the current
  /// library.
  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(LegalizeDataInRegionBase<DerivedT>)

protected:
  ::mlir::Pass::Option<bool> hostToDevice{*this, "host-to-device", ::llvm::cl::desc("Replace varPtr uses with accPtr if true. Replace accPtr uses with varPtr if false"), ::llvm::cl::init(true)};
};
#undef GEN_PASS_CLASSES
#endif // GEN_PASS_CLASSES