[all-commits] [llvm/llvm-project] 9ed772: [flang] Fixed computation of position of function'...

Slava Zakharin via All-commits all-commits at lists.llvm.org
Tue Mar 18 16:47:22 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9ed772cecc23f5f5b060720399b010275bbb7457
      https://github.com/llvm/llvm-project/commit/9ed772cecc23f5f5b060720399b010275bbb7457
  Author: Slava Zakharin <szakharin at nvidia.com>
  Date:   2025-03-18 (Tue, 18 Mar 2025)

  Changed paths:
    M flang/lib/Optimizer/Transforms/AddDebugInfo.cpp
    A flang/test/Transforms/debug-dummy-argument.fir

  Log Message:
  -----------
  [flang] Fixed computation of position of function's arg in AddDebugInfo. (#131672)

I am working on `-frepack-array` feature (#127147), which produces
non-trivial manipulations with arguments of `fir.declare`.
In this case, we end up with CFG computation of the `fir.declare`
argument, and AddDebugInfo pass incorrectly mapped two dummy arguments
to the same arg index in the debug attributes.
This patch makes sure that we assign the arg index only if we can prove
that we've traced the block argument to the function's entry block.
I believe this problem is not specific to `-frepack-arrays`, e.g.
it may appear due to MLIR inlining as well.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list