[all-commits] [llvm/llvm-project] 5d5583: [AssignmentTracking] Skip large types in redundant...

Orlando Cazalet-Hyams via All-commits all-commits at lists.llvm.org
Mon Dec 11 04:23:39 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5d5583979179e3b0702888adf188b10831037758
      https://github.com/llvm/llvm-project/commit/5d5583979179e3b0702888adf188b10831037758
  Author: Orlando Cazalet-Hyams <orlando.hyams at sony.com>
  Date:   2023-12-11 (Mon, 11 Dec 2023)

  Changed paths:
    M llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
    A llvm/test/DebugInfo/assignment-tracking/X86/large-type.ll

  Log Message:
  -----------
  [AssignmentTracking] Skip large types in redundant debug info pruning (#74329)

Fix https://github.com/llvm/llvm-project/issues/74189 (crash report).

The pruning code uses a BitVector to track which parts of a variable have been
defined in order to find redundant debug records. BitVector uses a u32 to track
size; variable of types with a bit-size greater than max(u32) ish* can't be
represented using a BitVector.

Fix the assertion by introducing a limit on type size. Improve performance by
bringing the limit down to a sensible number and tracking byte-sizes instead
of bit-sizes.

Skipping variables in this pruning code doesn't cause debug info correctness
issues; it just means there may be some extra redundant debug records.

(*) `max(u32) - 63` due to BitVector::NumBitWords implementation.




More information about the All-commits mailing list