[all-commits] [llvm/llvm-project] ee7f6a: [KeyInstr] Merge atoms in DILocation::getMergedLoc...

Orlando Cazalet-Hyams via All-commits all-commits at lists.llvm.org
Tue May 6 05:48:35 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ee7f6a5c6f8e9b8ad87da70e869cb7cc8065be2d
      https://github.com/llvm/llvm-project/commit/ee7f6a5c6f8e9b8ad87da70e869cb7cc8065be2d
  Author: Orlando Cazalet-Hyams <orlando.hyams at sony.com>
  Date:   2025-05-06 (Tue, 06 May 2025)

  Changed paths:
    M llvm/lib/IR/DebugInfoMetadata.cpp
    M llvm/unittests/IR/MetadataTest.cpp

  Log Message:
  -----------
  [KeyInstr] Merge atoms in DILocation::getMergedLocation (#133480)

NFC for builds with LLVM_EXPERIMENTAL_KEY_INSTRUCTIONS=OFF (default).

In an ideal world we would be able to track that the merged location is used in
multiple source atoms. We can't do this though, so instead we arbitrarily but
deterministically pick one.

In cases where the InlinedAt field is unchanged we keep the atom with the
lowest non-zero rank (highest precedence). If the ranks are equal we choose
the smaller non-zero group number (arbitrary choice).

In cases where the InlinedAt field is adjusted we generate a new atom group.
Keeping the group wouldn't make sense (a source atom is identified by the
group number and InlinedAt pair) but discarding the atom info could result
in missed is_stmts.

Add unittest in MetadataTest.cpp.

RFC:
https://discourse.llvm.org/t/rfc-improving-is-stmt-placement-for-better-interactive-debugging/82668



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