[all-commits] [llvm/llvm-project] fe18ab: [DebugInfo] Don't apply is_stmt on MBB branches th...

Stephen Tozer via All-commits all-commits at lists.llvm.org
Tue Nov 12 08:23:58 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fe18ab983d08b9e1726314009d677517d9cd5935
      https://github.com/llvm/llvm-project/commit/fe18ab983d08b9e1726314009d677517d9cd5935
  Author: Stephen Tozer <stephen.tozer at sony.com>
  Date:   2024-11-12 (Tue, 12 Nov 2024)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
    A llvm/test/DebugInfo/X86/is_stmt-at-block-start.ll

  Log Message:
  -----------
  [DebugInfo] Don't apply is_stmt on MBB branches that preserve lines (#108251)

This patch follows on from the changes made in #105524, by adding an
additional heuristic that prevents us from applying the start-of-MBB
is_stmt flag when we can see that, for all direct branches to the MBB,
the last line stepped on before the branch is the same as the first line
of the MBB. This is mainly to prevent certain pathological cases, such
as macros that expand to multiple basic blocks that all have the same
source location, from giving us repeated steps on the same line. This
approach is not comprehensive, since it relies on analyzeBranch to read
edges, but the default fallback of applying is_stmt may lead only to
useless steps in some cases, rather than skipping useful steps
altogether.



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