Files
gps/tools/local/circt/include/mlir/Conversion/ConvertToLLVM/ToLLVMDialectInterface.h.inc
T
2026-07-12 11:01:51 +03:00

35 lines
1.8 KiB
C++

/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|* *|
|* Dialect Interface Declarations *|
|* *|
|* Automatically generated file, do not edit! *|
|* *|
\*===----------------------------------------------------------------------===*/
namespace mlir {
/// Base class for dialect interfaces providing translation to LLVM IR.
/// Dialects that can be translated should provide an implementation of this
/// interface for the supported operations. The interface may be implemented in
/// a separate library to avoid the "main" dialect library depending on LLVM IR.
/// The interface can be attached using the delayed registration mechanism
/// available in DialectRegistry.
class ConvertToLLVMPatternInterface : public ::mlir::DialectInterface::Base<ConvertToLLVMPatternInterface> {
public:
/// Hook for derived dialect interface to load the dialects they
/// target. The LLVMDialect is implicitly already loaded, but this
/// method allows to load other intermediate dialects used in the
/// conversion, or target dialects like NVVM for example.
virtual void loadDependentDialects(::mlir::MLIRContext * context) const {}
/// Hook for derived dialect interface to provide conversion patterns
/// and mark dialect legal for the conversion target.
virtual void populateConvertToLLVMConversionPatterns(::mlir::ConversionTarget & target, ::mlir::LLVMTypeConverter & typeConverter, ::mlir::RewritePatternSet & patterns) const = 0;
protected:
ConvertToLLVMPatternInterface(::mlir::Dialect *dialect) : Base(dialect) {}
};
} // namespace mlir