Files
clang-p2996/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
Orlando Cazalet-Hyams 5d55839791 [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.
2023-12-11 12:23:26 +00:00

102 KiB