MLIR
20.0.0git
|
A helper class that converts llvm.loop metadata nodes into corresponding LoopAnnotationAttrs and llvm.access.group nodes into AccessGroupAttrs. More...
#include "Target/LLVMIR/LoopAnnotationImporter.h"
Public Member Functions | |
LoopAnnotationImporter (ModuleImport &moduleImport, OpBuilder &builder) | |
LoopAnnotationAttr | translateLoopAnnotation (const llvm::MDNode *node, Location loc) |
LogicalResult | translateAccessGroup (const llvm::MDNode *node, Location loc) |
Converts all LLVM access groups starting from node to MLIR access group attributes. More... | |
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 metadata node. More... | |
Public Attributes | |
ModuleImport & | moduleImport |
The ModuleImport owning this instance. More... | |
A helper class that converts llvm.loop metadata nodes into corresponding LoopAnnotationAttrs and llvm.access.group nodes into AccessGroupAttrs.
Definition at line 26 of file LoopAnnotationImporter.h.
|
inline |
Definition at line 28 of file LoopAnnotationImporter.h.
FailureOr< SmallVector< AccessGroupAttr > > LoopAnnotationImporter::lookupAccessGroupAttrs | ( | const llvm::MDNode * | node | ) | const |
Returns the access group attribute that map to the access group nodes starting from the access group metadata node.
Returns failure, if any of the attributes cannot be found.
Definition at line 515 of file LoopAnnotationImporter.cpp.
LogicalResult LoopAnnotationImporter::translateAccessGroup | ( | const llvm::MDNode * | node, |
Location | loc | ||
) |
Converts all LLVM access groups starting from node to MLIR access group attributes.
It stores a mapping from every nested access group node to the translated attribute. Returns success if all conversions succeed and failure otherwise.
Definition at line 487 of file LoopAnnotationImporter.cpp.
References mlir::emitWarning(), and mlir::Builder::getAttr().
LoopAnnotationAttr LoopAnnotationImporter::translateLoopAnnotation | ( | const llvm::MDNode * | node, |
Location | loc | ||
) |
Definition at line 469 of file LoopAnnotationImporter.cpp.
ModuleImport& mlir::LLVM::detail::LoopAnnotationImporter::moduleImport |
The ModuleImport owning this instance.
Definition at line 46 of file LoopAnnotationImporter.h.