MLIR 23.0.0git
ToLLVMInterface.h
Go to the documentation of this file.
1//===- ToLLVMInterface.h - Conversion to LLVM iface ---*- C++ -*-=============//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef MLIR_CONVERSION_CONVERTTOLLVM_TOLLVMINTERFACE_H
10#define MLIR_CONVERSION_CONVERTTOLLVM_TOLLVMINTERFACE_H
11
13#include "mlir/IR/MLIRContext.h"
15
16namespace mlir {
17class ConversionTarget;
19class MLIRContext;
20class Operation;
22class AnalysisManager;
23
24/// Recursively walk the IR and collect all dialects implementing the interface,
25/// and populate the conversion patterns.
27 ConversionTarget &target,
28 LLVMTypeConverter &typeConverter,
29 RewritePatternSet &patterns);
30
31/// Helper function for populating LLVM conversion patterns. If `op` implements
32/// the `ConvertToLLVMOpInterface` interface, then the LLVM conversion pattern
33/// attributes provided by the interface will be used to configure the
34/// conversion target, type converter, and the pattern set.
36 ConversionTarget &target,
37 LLVMTypeConverter &typeConverter,
38 RewritePatternSet &patterns);
39} // namespace mlir
40
41#include "mlir/Conversion/ConvertToLLVM/ToLLVMAttrInterface.h.inc"
42
43#include "mlir/Conversion/ConvertToLLVM/ToLLVMOpInterface.h.inc"
44
45#include "mlir/Conversion/ConvertToLLVM/ToLLVMDialectInterface.h.inc"
46
47#endif // MLIR_CONVERSION_CONVERTTOLLVM_TOLLVMINTERFACE_H
This class represents an analysis manager for a particular operation instance.
Conversion from types to the LLVM IR dialect.
MLIRContext is the top-level object for a collection of MLIR operations.
Definition MLIRContext.h:63
Operation is the basic unit of execution within MLIR.
Definition Operation.h:88
Include the generated interface declarations.
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.