13#ifndef MLIR_TARGET_LLVMIR_LLVMTRANSLATIONINTERFACE_H
14#define MLIR_TARGET_LLVMIR_LLVMTRANSLATIONINTERFACE_H
32#include "mlir/Target/LLVMIR/LLVMTranslationDialectInterface.h.inc"
49 return iface->convertOperation(op, builder, moduleTranslation);
59 if (
const LLVMTranslationDialectInterface *iface =
61 return iface->amendOperation(op, instructions, attribute,
73 if (
const LLVMTranslationDialectInterface *iface =
75 return iface->convertParameterAttr(function, argIdx, attribute,
78 function.emitWarning(
"Unhandled parameter attribute '" +
79 attribute.
getName().str() +
"'");
DialectInterfaceCollection< LLVMTranslationDialectInterface > Base
DialectInterfaceCollection(MLIRContext *ctx)
const LLVMTranslationDialectInterface * getInterfaceFor(Object *obj) const
Interface collection for translation to LLVM IR, dispatches to a concrete interface implementation ba...
virtual LogicalResult convertParameterAttr(LLVM::LLVMFuncOp function, int argIdx, NamedAttribute attribute, LLVM::ModuleTranslation &moduleTranslation) const
Acts on the given function operation using the interface implemented by the dialect of one of the fun...
virtual LogicalResult amendOperation(Operation *op, ArrayRef< llvm::Instruction * > instructions, NamedAttribute attribute, LLVM::ModuleTranslation &moduleTranslation) const
Acts on the given operation using the interface implemented by the dialect of one of the operation's ...
virtual LogicalResult convertOperation(Operation *op, llvm::IRBuilderBase &builder, LLVM::ModuleTranslation &moduleTranslation) const
Translates the given operation to LLVM IR using the interface implemented by the op's dialect.
Implementation class for module translation.
NamedAttribute represents a combination of a name and an Attribute value.
StringAttr getName() const
Return the name of the attribute.
Dialect * getNameDialect() const
Return the dialect of the name of this attribute, if the name is prefixed by a dialect namespace.
Operation is the basic unit of execution within MLIR.
The OpAsmOpInterface, see OpAsmInterface.td for more details.
Include the generated interface declarations.