14 #ifndef MLIR_LIB_TARGET_LLVMIR_LOOPANNOTATIONIMPORTER_H_
15 #define MLIR_LIB_TARGET_LLVMIR_LOOPANNOTATIONIMPORTER_H_
50 LoopAnnotationAttr lookupLoopMetadata(
const llvm::MDNode *node)
const {
51 return loopMetadataMapping.lookup(node);
54 void mapLoopMetadata(
const llvm::MDNode *metadata, LoopAnnotationAttr attr) {
55 auto result = loopMetadataMapping.try_emplace(metadata, attr);
57 assert(result.second &&
58 "attempting to map loop options that was already mapped");
This class provides support for representing a failure result, or a valid value of type T.
Module import implementation class that provides methods to import globals and functions from an LLVM...
A helper class that converts llvm.loop metadata nodes into corresponding LoopAnnotationAttrs and llvm...
LoopAnnotationAttr translateLoopAnnotation(const llvm::MDNode *node, Location loc)
LoopAnnotationImporter(ModuleImport &moduleImport, OpBuilder &builder)
LogicalResult translateAccessGroup(const llvm::MDNode *node, Location loc)
Converts all LLVM access groups starting from node to MLIR access group attributes.
ModuleImport & moduleImport
The ModuleImport owning this instance.
FailureOr< SmallVector< AccessGroupAttr > > lookupAccessGroupAttrs(const llvm::MDNode *node) const
Returns the access group attribute that map to the access group nodes starting from the access group ...
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...
This class helps build Operations.
Include the generated interface declarations.
This class represents an efficient way to signal success or failure.