[all-commits] [llvm/llvm-project] 836703: [BranchFolder] Fix missing debug info with tail me...

Alan Zhao via All-commits all-commits at lists.llvm.org
Thu Jun 20 10:48:41 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 836703087d761f9cbf81b6f9593bc5313660f559
      https://github.com/llvm/llvm-project/commit/836703087d761f9cbf81b6f9593bc5313660f559
  Author: Alan Zhao <ayzhao at google.com>
  Date:   2024-06-20 (Thu, 20 Jun 2024)

  Changed paths:
    M llvm/lib/CodeGen/BranchFolding.cpp
    M llvm/lib/CodeGen/BranchFolding.h
    A llvm/test/CodeGen/MIR/X86/tail-merging-preserve-debugloc.mir
    M llvm/test/DebugInfo/COFF/local-variables.ll

  Log Message:
  -----------
  [BranchFolder] Fix missing debug info with tail merging (#94715)

`BranchFolder::TryTailMergeBlocks(...)` removes unconditional branch
instructions and then recreates them. However, this process loses debug
source location information from the previous branch instruction, even
if tail merging doesn't change IR. This patch preserves the debug
information from the removed instruction and inserts them into the
recreated instruction.

Fixes #94050



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