[all-commits] [llvm/llvm-project] 87e547: [Flang] Add/Restore basic debug support (1/n)

kiranchandramohan via All-commits all-commits at lists.llvm.org
Thu Jan 12 02:44:22 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 87e547d8f035c8de321e246629dd2b1ccec31662
      https://github.com/llvm/llvm-project/commit/87e547d8f035c8de321e246629dd2b1ccec31662
  Author: Kiran Chandramohan <kiran.chandramohan at arm.com>
  Date:   2023-01-12 (Thu, 12 Jan 2023)

  Changed paths:
    M flang/include/flang/Lower/Bridge.h
    M flang/include/flang/Optimizer/Transforms/Passes.h
    M flang/include/flang/Optimizer/Transforms/Passes.td
    M flang/include/flang/Tools/CLOptions.inc
    M flang/lib/Frontend/FrontendActions.cpp
    M flang/lib/Lower/Bridge.cpp
    A flang/lib/Optimizer/Transforms/AddDebugFoundation.cpp
    M flang/lib/Optimizer/Transforms/CMakeLists.txt
    A flang/test/Lower/module-debug-file-loc.f90
    A flang/test/Transforms/debug-line-table.fir
    M flang/tools/bbc/bbc.cpp

  Log Message:
  -----------
  [Flang] Add/Restore basic debug support (1/n)

Recent changes to MLIR meant that Flang does not generate any debug line
table information.

This patch adds a pass that provides some foundation work with which
basic line table debug info can be generated. A walk is performed on
all the `func` ops in the module and they are decorated with a fusedLoc
op that contains the debug metadata for the subroutine along with
location information.

Alternatives include populating this info during lowering or during FIR
to LLVM Dialect conversion.

Note: Patches in future will add
    -> more realistic debug info for types and other fields.
    -> driver flags to control generation of debug.

Fixes #58634.

Reviewed By: awarzynski, vzakhari

Differential Revision: https://reviews.llvm.org/D137956




More information about the All-commits mailing list