[mlir][llvm] Import additional debug info from LLVMIR.
authorTobias Gysi <tobias.gysi@nextsilicon.com>
Fri, 18 Nov 2022 08:44:26 +0000 (09:44 +0100)
committerTobias Gysi <tobias.gysi@nextsilicon.com>
Fri, 18 Nov 2022 08:44:40 +0000 (09:44 +0100)
commit3f63889d58c363348832eaf789e340f11d0d0ee8
treedb196efe4f2cec9a65a301dbd958691fbda15825
parent63502901ca448ea0710c83332512a8d73144f496
[mlir][llvm] Import additional debug info from LLVMIR.

Add a DebugImporter to convert LLVMIR debug metadata into
MLIR debug attributes. It is the counterpart to the
DebugTranslation class and supports the same attributes.
The revision only supports the translation of instruction,
function, and module debug information. The import of
intrinsics is left to a later revision.

Depends on D138206

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D138209
mlir/lib/Target/LLVMIR/CMakeLists.txt
mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
mlir/lib/Target/LLVMIR/DebugImporter.cpp [new file with mode: 0644]
mlir/lib/Target/LLVMIR/DebugImporter.h [new file with mode: 0644]
mlir/test/Target/LLVMIR/Import/debug-info.ll