Created
August 7, 2023 18:01
-
-
Save j2kun/4d21d5bc85f6c9326bef81eaf6c323e7 to your computer and use it in GitHub Desktop.
The code generated by mlir-tblgen for AffineFullUnroll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Autogenerated by mlir-tblgen; don't manually edit */ | |
#ifdef GEN_PASS_DECL | |
// Generate declarations for all passes. | |
#define GEN_PASS_DECL_AFFINEFULLUNROLL | |
#define GEN_PASS_DECL_AFFINEFULLUNROLLPATTERNREWRITE | |
#undef GEN_PASS_DECL | |
#endif // GEN_PASS_DECL | |
//===----------------------------------------------------------------------===// | |
// AffineFullUnroll | |
//===----------------------------------------------------------------------===// | |
#ifdef GEN_PASS_DECL_AFFINEFULLUNROLL | |
std::unique_ptr<::mlir::Pass> createAffineFullUnroll(); | |
#undef GEN_PASS_DECL_AFFINEFULLUNROLL | |
#endif // GEN_PASS_DECL_AFFINEFULLUNROLL | |
#ifdef GEN_PASS_DEF_AFFINEFULLUNROLL | |
namespace impl { | |
std::unique_ptr<::mlir::Pass> createAffineFullUnroll(); | |
} // namespace impl | |
namespace impl { | |
template <typename DerivedT> | |
class AffineFullUnrollBase : public ::mlir::OperationPass<> { | |
public: | |
using Base = AffineFullUnrollBase; | |
AffineFullUnrollBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {} | |
AffineFullUnrollBase(const AffineFullUnrollBase &other) : ::mlir::OperationPass<>(other) {} | |
/// Returns the command-line argument attached to this pass. | |
static constexpr ::llvm::StringLiteral getArgumentName() { | |
return ::llvm::StringLiteral("affine-full-unroll"); | |
} | |
::llvm::StringRef getArgument() const override { return "affine-full-unroll"; } | |
::llvm::StringRef getDescription() const override { return "Fully unroll all affine loops"; } | |
/// Returns the derived pass name. | |
static constexpr ::llvm::StringLiteral getPassName() { | |
return ::llvm::StringLiteral("AffineFullUnroll"); | |
} | |
::llvm::StringRef getName() const override { return "AffineFullUnroll"; } | |
/// 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 ®istry) const override { | |
registry.insert<mlir::affine::AffineDialect>(); | |
} | |
/// 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(AffineFullUnrollBase<DerivedT>) | |
protected: | |
private: | |
friend std::unique_ptr<::mlir::Pass> createAffineFullUnroll() { | |
return std::make_unique<DerivedT>(); | |
} | |
}; | |
} // namespace impl | |
std::unique_ptr<::mlir::Pass> createAffineFullUnroll() { | |
return impl::createAffineFullUnroll(); | |
} | |
#undef GEN_PASS_DEF_AFFINEFULLUNROLL | |
#endif // GEN_PASS_DEF_AFFINEFULLUNROLL | |
//===----------------------------------------------------------------------===// | |
// AffineFullUnrollPatternRewrite | |
//===----------------------------------------------------------------------===// | |
#ifdef GEN_PASS_DECL_AFFINEFULLUNROLLPATTERNREWRITE | |
std::unique_ptr<::mlir::Pass> createAffineFullUnrollPatternRewrite(); | |
#undef GEN_PASS_DECL_AFFINEFULLUNROLLPATTERNREWRITE | |
#endif // GEN_PASS_DECL_AFFINEFULLUNROLLPATTERNREWRITE | |
#ifdef GEN_PASS_DEF_AFFINEFULLUNROLLPATTERNREWRITE | |
namespace impl { | |
std::unique_ptr<::mlir::Pass> createAffineFullUnrollPatternRewrite(); | |
} // namespace impl | |
namespace impl { | |
template <typename DerivedT> | |
class AffineFullUnrollPatternRewriteBase : public ::mlir::OperationPass<> { | |
public: | |
using Base = AffineFullUnrollPatternRewriteBase; | |
AffineFullUnrollPatternRewriteBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {} | |
AffineFullUnrollPatternRewriteBase(const AffineFullUnrollPatternRewriteBase &other) : ::mlir::OperationPass<>(other) {} | |
/// Returns the command-line argument attached to this pass. | |
static constexpr ::llvm::StringLiteral getArgumentName() { | |
return ::llvm::StringLiteral("affine-full-unroll-rewrite"); | |
} | |
::llvm::StringRef getArgument() const override { return "affine-full-unroll-rewrite"; } | |
::llvm::StringRef getDescription() const override { return "Fully unroll all affine loops using the pattern rewrite engine"; } | |
/// Returns the derived pass name. | |
static constexpr ::llvm::StringLiteral getPassName() { | |
return ::llvm::StringLiteral("AffineFullUnrollPatternRewrite"); | |
} | |
::llvm::StringRef getName() const override { return "AffineFullUnrollPatternRewrite"; } | |
/// 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 ®istry) const override { | |
registry.insert<mlir::affine::AffineDialect>(); | |
} | |
/// 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(AffineFullUnrollPatternRewriteBase<DerivedT>) | |
protected: | |
private: | |
friend std::unique_ptr<::mlir::Pass> createAffineFullUnrollPatternRewrite() { | |
return std::make_unique<DerivedT>(); | |
} | |
}; | |
} // namespace impl | |
std::unique_ptr<::mlir::Pass> createAffineFullUnrollPatternRewrite() { | |
return impl::createAffineFullUnrollPatternRewrite(); | |
} | |
#undef GEN_PASS_DEF_AFFINEFULLUNROLLPATTERNREWRITE | |
#endif // GEN_PASS_DEF_AFFINEFULLUNROLLPATTERNREWRITE | |
#ifdef GEN_PASS_REGISTRATION | |
//===----------------------------------------------------------------------===// | |
// AffineFullUnroll Registration | |
//===----------------------------------------------------------------------===// | |
inline void registerAffineFullUnroll() { | |
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> { | |
return createAffineFullUnroll(); | |
}); | |
} | |
// Old registration code, kept for temporary backwards compatibility. | |
inline void registerAffineFullUnrollPass() { | |
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> { | |
return createAffineFullUnroll(); | |
}); | |
} | |
//===----------------------------------------------------------------------===// | |
// AffineFullUnrollPatternRewrite Registration | |
//===----------------------------------------------------------------------===// | |
inline void registerAffineFullUnrollPatternRewrite() { | |
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> { | |
return createAffineFullUnrollPatternRewrite(); | |
}); | |
} | |
// Old registration code, kept for temporary backwards compatibility. | |
inline void registerAffineFullUnrollPatternRewritePass() { | |
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> { | |
return createAffineFullUnrollPatternRewrite(); | |
}); | |
} | |
//===----------------------------------------------------------------------===// | |
// Affine Registration | |
//===----------------------------------------------------------------------===// | |
inline void registerAffinePasses() { | |
registerAffineFullUnroll(); | |
registerAffineFullUnrollPatternRewrite(); | |
} | |
#undef GEN_PASS_REGISTRATION | |
#endif // GEN_PASS_REGISTRATION | |
// Deprecated. Please use the new per-pass macros. | |
#ifdef GEN_PASS_CLASSES | |
template <typename DerivedT> | |
class AffineFullUnrollBase : public ::mlir::OperationPass<> { | |
public: | |
using Base = AffineFullUnrollBase; | |
AffineFullUnrollBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {} | |
AffineFullUnrollBase(const AffineFullUnrollBase &other) : ::mlir::OperationPass<>(other) {} | |
/// Returns the command-line argument attached to this pass. | |
static constexpr ::llvm::StringLiteral getArgumentName() { | |
return ::llvm::StringLiteral("affine-full-unroll"); | |
} | |
::llvm::StringRef getArgument() const override { return "affine-full-unroll"; } | |
::llvm::StringRef getDescription() const override { return "Fully unroll all affine loops"; } | |
/// Returns the derived pass name. | |
static constexpr ::llvm::StringLiteral getPassName() { | |
return ::llvm::StringLiteral("AffineFullUnroll"); | |
} | |
::llvm::StringRef getName() const override { return "AffineFullUnroll"; } | |
/// 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 ®istry) const override { | |
registry.insert<mlir::affine::AffineDialect>(); | |
} | |
/// 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(AffineFullUnrollBase<DerivedT>) | |
protected: | |
}; | |
template <typename DerivedT> | |
class AffineFullUnrollPatternRewriteBase : public ::mlir::OperationPass<> { | |
public: | |
using Base = AffineFullUnrollPatternRewriteBase; | |
AffineFullUnrollPatternRewriteBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {} | |
AffineFullUnrollPatternRewriteBase(const AffineFullUnrollPatternRewriteBase &other) : ::mlir::OperationPass<>(other) {} | |
/// Returns the command-line argument attached to this pass. | |
static constexpr ::llvm::StringLiteral getArgumentName() { | |
return ::llvm::StringLiteral("affine-full-unroll-rewrite"); | |
} | |
::llvm::StringRef getArgument() const override { return "affine-full-unroll-rewrite"; } | |
::llvm::StringRef getDescription() const override { return "Fully unroll all affine loops using the pattern rewrite engine"; } | |
/// Returns the derived pass name. | |
static constexpr ::llvm::StringLiteral getPassName() { | |
return ::llvm::StringLiteral("AffineFullUnrollPatternRewrite"); | |
} | |
::llvm::StringRef getName() const override { return "AffineFullUnrollPatternRewrite"; } | |
/// 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 ®istry) const override { | |
registry.insert<mlir::affine::AffineDialect>(); | |
} | |
/// 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(AffineFullUnrollPatternRewriteBase<DerivedT>) | |
protected: | |
}; | |
#undef GEN_PASS_CLASSES | |
#endif // GEN_PASS_CLASSES |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment