21 if (!dialects.insert(dialect).second)
25 auto *iface = dyn_cast<ConvertToLLVMPatternInterface>(dialect);
28 iface->populateConvertToLLVMConversionPatterns(
target, typeConverter,
36 auto iface = dyn_cast<ConvertToLLVMOpInterface>(op);
42 iface.getConvertToLLVMConversionAttrs(attrs);
43 for (ConvertToLLVMAttrInterface attr : attrs)
44 attr.populateConvertToLLVMConversionPatterns(
target, typeConverter,
48#include "mlir/Conversion/ConvertToLLVM/ToLLVMAttrInterface.cpp.inc"
50#include "mlir/Conversion/ConvertToLLVM/ToLLVMOpInterface.cpp.inc"
Dialects are groups of MLIR operations, types and attributes, as well as behavior associated with the...
Conversion from types to the LLVM IR dialect.
Operation is the basic unit of execution within MLIR.
Dialect * getDialect()
Return the dialect this operation is associated with, or nullptr if the associated dialect is not loa...
OpTy getParentOfType()
Return the closest surrounding parent operation that is of type 'OpTy'.
std::enable_if_t< llvm::function_traits< std::decay_t< FnT > >::num_args==1, RetT > walk(FnT &&callback)
Walk the operation by calling the callback for each nested operation (including this one),...
Include the generated interface declarations.
llvm::DenseSet< ValueT, ValueInfoT > DenseSet
const FrozenRewritePatternSet & patterns
void populateConversionTargetFromOperation(Operation *op, ConversionTarget &target, TypeConverter &typeConverter, RewritePatternSet &patterns)
Recursively walk the IR and collect all dialects implementing the interface, and populate the convers...
void populateOpConvertToLLVMConversionPatterns(Operation *op, ConversionTarget &target, LLVMTypeConverter &typeConverter, RewritePatternSet &patterns)
Helper function for populating LLVM conversion patterns.