[all-commits] [llvm/llvm-project] 72429a: Add a pass that builds a debug info scope for LLVM...
Mehdi Amini via All-commits
all-commits at lists.llvm.org
Tue Feb 14 22:43:46 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 72429a42ac33564fa82449d99dc234da32a05498
https://github.com/llvm/llvm-project/commit/72429a42ac33564fa82449d99dc234da32a05498
Author: Mehdi Amini <joker.eph at gmail.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M mlir/examples/toy/Ch6/toyc.cpp
M mlir/examples/toy/Ch7/toyc.cpp
M mlir/include/mlir/Dialect/LLVMIR/Transforms/Passes.h
M mlir/include/mlir/Dialect/LLVMIR/Transforms/Passes.td
M mlir/lib/Dialect/LLVMIR/Transforms/CMakeLists.txt
A mlir/lib/Dialect/LLVMIR/Transforms/DIScopeForLLVMFuncOp.cpp
A mlir/test/Dialect/LLVMIR/add-debuginfo-func-scope.mlir
Log Message:
-----------
Add a pass that builds a debug info scope for LLVMFuncOp (adding a DISubprogramAttr)
This may be seen as a hack, but it allows for any piece of MLIR to be able
to end up with DWARF debug info through LLVM.
Assuming the operations in the function have location such as FileLineCol,
this provides backtraces with line tables and allows to step in a debugger.
That makes this pass a perfect companion to -snapshot-op-locations
It was also the default behavior of MLIR to LLVM IR translation until MLIR
got support for proper debug info attributes.
Differential Revision: https://reviews.llvm.org/D144069
More information about the All-commits
mailing list