#ifdef GEN_PASS_DECL
#define GEN_PASS_DECL_AMDGPUEMULATEATOMICSPASS
#undef GEN_PASS_DECL
#endif
#ifdef GEN_PASS_DECL_AMDGPUEMULATEATOMICSPASS
struct AmdgpuEmulateAtomicsPassOptions { … };
std::unique_ptr<::mlir::Pass> createAmdgpuEmulateAtomicsPass();
std::unique_ptr<::mlir::Pass> createAmdgpuEmulateAtomicsPass(AmdgpuEmulateAtomicsPassOptions options);
#undef GEN_PASS_DECL_AMDGPUEMULATEATOMICSPASS
#endif
#ifdef GEN_PASS_DEF_AMDGPUEMULATEATOMICSPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createAmdgpuEmulateAtomicsPass();
}
namespace impl {
std::unique_ptr<::mlir::Pass> createAmdgpuEmulateAtomicsPass(AmdgpuEmulateAtomicsPassOptions options);
}
namespace impl {
template <typename DerivedT>
class AmdgpuEmulateAtomicsPassBase : public ::mlir::OperationPass<> {
public:
using Base = AmdgpuEmulateAtomicsPassBase;
AmdgpuEmulateAtomicsPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
AmdgpuEmulateAtomicsPassBase(const AmdgpuEmulateAtomicsPassBase &other) : ::mlir::OperationPass<>(other) {}
AmdgpuEmulateAtomicsPassBase& operator=(const AmdgpuEmulateAtomicsPassBase &) = delete;
AmdgpuEmulateAtomicsPassBase(AmdgpuEmulateAtomicsPassBase &&) = delete;
AmdgpuEmulateAtomicsPassBase& operator=(AmdgpuEmulateAtomicsPassBase &&) = delete;
~AmdgpuEmulateAtomicsPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("amdgpu-emulate-atomics");
}
::llvm::StringRef getArgument() const override { return "amdgpu-emulate-atomics"; }
::llvm::StringRef getDescription() const override { return "Emulate atomic operations on chipsets that do not support them"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("AmdgpuEmulateAtomicsPass");
}
::llvm::StringRef getName() const override { return "AmdgpuEmulateAtomicsPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<cf::ControlFlowDialect>();
registry.insert<arith::ArithDialect>();
registry.insert<vector::VectorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(AmdgpuEmulateAtomicsPassBase<DerivedT>)
AmdgpuEmulateAtomicsPassBase(AmdgpuEmulateAtomicsPassOptions options) : AmdgpuEmulateAtomicsPassBase() {
chipset = std::move(options.chipset);
}
protected:
::mlir::Pass::Option<std::string> chipset{*this, "chipset", ::llvm::cl::desc("Chipset that these operations will run on"), ::llvm::cl::init("gfx000")};
private:
friend std::unique_ptr<::mlir::Pass> createAmdgpuEmulateAtomicsPass() {
return std::make_unique<DerivedT>();
}
friend std::unique_ptr<::mlir::Pass> createAmdgpuEmulateAtomicsPass(AmdgpuEmulateAtomicsPassOptions options) {
return std::make_unique<DerivedT>(std::move(options));
}
};
}
std::unique_ptr<::mlir::Pass> createAmdgpuEmulateAtomicsPass() {
return impl::createAmdgpuEmulateAtomicsPass();
}
std::unique_ptr<::mlir::Pass> createAmdgpuEmulateAtomicsPass(AmdgpuEmulateAtomicsPassOptions options) {
return impl::createAmdgpuEmulateAtomicsPass(std::move(options));
}
#undef GEN_PASS_DEF_AMDGPUEMULATEATOMICSPASS
#endif
#ifdef GEN_PASS_REGISTRATION
inline void registerAmdgpuEmulateAtomicsPass() { … }
inline void registerAmdgpuEmulateAtomicsPassPass() { … }
inline void registerAMDGPUPasses() { … }
#undef GEN_PASS_REGISTRATION
#endif
#ifdef GEN_PASS_CLASSES
template <typename DerivedT>
class AmdgpuEmulateAtomicsPassBase : public ::mlir::OperationPass<> {
public:
using Base = AmdgpuEmulateAtomicsPassBase;
AmdgpuEmulateAtomicsPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
AmdgpuEmulateAtomicsPassBase(const AmdgpuEmulateAtomicsPassBase &other) : ::mlir::OperationPass<>(other) {}
AmdgpuEmulateAtomicsPassBase& operator=(const AmdgpuEmulateAtomicsPassBase &) = delete;
AmdgpuEmulateAtomicsPassBase(AmdgpuEmulateAtomicsPassBase &&) = delete;
AmdgpuEmulateAtomicsPassBase& operator=(AmdgpuEmulateAtomicsPassBase &&) = delete;
~AmdgpuEmulateAtomicsPassBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("amdgpu-emulate-atomics");
}
::llvm::StringRef getArgument() const override { return "amdgpu-emulate-atomics"; }
::llvm::StringRef getDescription() const override { return "Emulate atomic operations on chipsets that do not support them"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("AmdgpuEmulateAtomicsPass");
}
::llvm::StringRef getName() const override { return "AmdgpuEmulateAtomicsPass"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<cf::ControlFlowDialect>();
registry.insert<arith::ArithDialect>();
registry.insert<vector::VectorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(AmdgpuEmulateAtomicsPassBase<DerivedT>)
protected:
::mlir::Pass::Option<std::string> chipset{*this, "chipset", ::llvm::cl::desc("Chipset that these operations will run on"), ::llvm::cl::init("gfx000")};
};
#undef GEN_PASS_CLASSES
#endif