14 #ifndef MLIR_LIB_TARGET_LLVMIR_LOOPANNOTATIONTRANSLATION_H_
15 #define MLIR_LIB_TARGET_LLVMIR_LOOPANNOTATIONTRANSLATION_H_
29 llvm::Module &llvmModule)
48 return loopMetadataMapping.lookup(
options);
52 auto result = loopMetadataMapping.try_emplace(
options, metadata);
54 assert(result.second &&
55 "attempting to map loop options that was already mapped");
67 llvm::Module &llvmModule;
static llvm::ManagedStatic< PassManagerOptions > options
Attributes are known-constant values of operations.
Implementation class for module translation.
A helper class that converts LoopAnnotationAttrs and AccessGroupAttrs into corresponding llvm::MDNode...
llvm::MDNode * translateLoopAnnotation(LoopAnnotationAttr attr, Operation *op)
LoopAnnotationTranslation(ModuleTranslation &moduleTranslation, llvm::Module &llvmModule)
llvm::MDNode * getAccessGroups(AccessGroupOpInterface op)
Returns the LLVM metadata corresponding to the access group attribute referenced by the AccessGroupOp...
ModuleTranslation & moduleTranslation
The ModuleTranslation owning this instance.
llvm::MDNode * getAccessGroup(AccessGroupAttr accessGroupAttr)
Returns the LLVM metadata corresponding to an mlir LLVM dialect access group attribute.
Operation is the basic unit of execution within MLIR.
Include the generated interface declarations.