24struct X86IntrinsicOpConversion
29 matchAndRewrite(x86::X86IntrinsicOp op, ArrayRef<Value> operands,
30 ConversionPatternRewriter &rewriter)
const override {
31 const LLVMTypeConverter &typeConverter = *getTypeConverter();
33 op, rewriter.getStringAttr(op.getIntrinsicName()),
34 op.getIntrinsicOperands(operands, typeConverter, rewriter),
35 typeConverter, rewriter);
44 patterns.
add<X86IntrinsicOpConversion>(converter);
46 return LLVM::LLVMX86AMXType::get(&converter.
getContext());
51 target.addIllegalDialect<X86Dialect>();
59 void populateConvertToLLVMConversionPatterns(
69 dialect->addInterfaces<X86ToLLVMDialectInterface>();
Utility class for operation conversions targeting the LLVM dialect that allows for matching and rewri...
ConvertOpInterfaceToLLVMPattern(const LLVMTypeConverter &typeConverter, PatternBenefit benefit=1)
Base class for dialect interfaces providing translation to LLVM IR.
ConvertToLLVMPatternInterface(Dialect *dialect)
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
bool addExtension(TypeID extensionID, std::unique_ptr< DialectExtensionBase > extension)
Add the given extension to the registry.
Derived class that automatically populates legalization information for different LLVM ops.
Conversion from types to the LLVM IR dialect.
MLIRContext & getContext() const
Returns the MLIR context.
MLIRContext is the top-level object for a collection of MLIR operations.
RewritePatternSet & add(ConstructorArg &&arg, ConstructorArgs &&...args)
Add an instance of each of the pattern types 'Ts' to the pattern list with the given arguments.
LogicalResult intrinsicRewrite(Operation *op, StringRef intrinsic, ValueRange operands, const LLVMTypeConverter &typeConverter, RewriterBase &rewriter)
Replaces the given operation "op" with a call to an LLVM intrinsic with the specified name "intrinsic...
mlir::x86::AMXTileType TileType
Include the generated interface declarations.
void configureX86LegalizeForExportTarget(LLVMConversionTarget &target)
Configure the target to support lowering X86 ops to ops that map to LLVM intrinsics.
void populateX86LegalizeForLLVMExportPatterns(LLVMTypeConverter &converter, RewritePatternSet &patterns)
Collect a set of patterns to lower X86 ops to ops that map to LLVM intrinsics.
void registerConvertX86ToLLVMInterface(DialectRegistry ®istry)
Register LLVM conversion interface for X86 dialect.