17 #include "llvm/IR/ConstantRange.h"
18 #include "llvm/IR/IntrinsicsNVPTX.h"
27 #include "mlir/Dialect/LLVMIR/NVVMConvertibleLLVMIRIntrinsics.inc"
29 return convertibleIntrinsics.contains(
id);
36 #include "mlir/Dialect/LLVMIR/NVVMConvertibleLLVMIRIntrinsics.inc"
38 return convertibleIntrinsics;
55 llvmOpBundles.reserve(inst->getNumOperandBundles());
56 for (
unsigned i = 0; i < inst->getNumOperandBundles(); ++i)
57 llvmOpBundles.push_back(inst->getOperandBundleAt(i));
59 #include "mlir/Dialect/LLVMIR/NVVMFromLLVMIRConversions.inc"
75 LogicalResult convertIntrinsic(
OpBuilder &builder, llvm::CallInst *inst,
90 registry.
insert<NVVM::NVVMDialect>();
92 dialect->addInterfaces<NVVMDialectLLVMIRImportInterface>();
static ArrayRef< unsigned > getSupportedIntrinsicsImpl()
Returns the list of LLVM IR intrinsic identifiers that are convertible to MLIR NVVM dialect intrinsic...
static bool isConvertibleIntrinsic(llvm::Intrinsic::ID id)
Returns true if the LLVM IR intrinsic is convertible to an MLIR NVVM dialect intrinsic.
static LogicalResult convertIntrinsicImpl(OpBuilder &odsBuilder, llvm::CallInst *inst, LLVM::ModuleImport &moduleImport)
Converts the LLVM intrinsic to an MLIR NVVM dialect operation if a conversion exits.
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.
Base class for dialect interfaces used to import LLVM IR.
LLVMImportDialectInterface(Dialect *dialect)
Module import implementation class that provides methods to import globals and functions from an LLVM...
MLIRContext is the top-level object for a collection of MLIR operations.
void appendDialectRegistry(const DialectRegistry ®istry)
Append the contents of the given dialect registry to the registry associated with this context.
This class helps build Operations.
Include the generated interface declarations.
void registerNVVMDialectImport(DialectRegistry ®istry)
Registers the NVVM dialect and its import from LLVM IR in the given registry.