[mlir][llvm] Add support for loop metadata import
authorChristian Ulmann <christian.ulmann@nextsilicon.com>
Wed, 8 Feb 2023 10:05:14 +0000 (11:05 +0100)
committerChristian Ulmann <christian.ulmann@nextsilicon.com>
Wed, 8 Feb 2023 10:45:15 +0000 (11:45 +0100)
commitb83caa32dc86cfc4d7f7b160284c2f7d002dea75
tree7a09f8a5a79f9efb9614af8ce3ff9ee127c3aa19
parent09216cfdab87fc97afc0b0bc7998adff5ab283c0
[mlir][llvm] Add support for loop metadata import

This commit introduces functionality to import loop metadata. Loop
metadata nodes are transformed into LoopAnnotationAttrs and attached to
the corresponding branch operations.

Reviewed By: gysit

Differential Revision: https://reviews.llvm.org/D143376
mlir/include/mlir/Target/LLVMIR/ModuleImport.h
mlir/lib/Target/LLVMIR/CMakeLists.txt
mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMIRToLLVMTranslation.cpp
mlir/lib/Target/LLVMIR/LoopAnnotationImporter.cpp [new file with mode: 0644]
mlir/lib/Target/LLVMIR/LoopAnnotationImporter.h [new file with mode: 0644]
mlir/lib/Target/LLVMIR/ModuleImport.cpp
mlir/test/Target/LLVMIR/Import/import-failure.ll
mlir/test/Target/LLVMIR/Import/metadata-loop.ll