Commit Graph

6 Commits

Author SHA1 Message Date
swift-ci
43bd40f4d7 Merge remote-tracking branch 'origin/main' into rebranch 2024-08-08 19:11:05 -07:00
Alexander Cyon
0c74fe6f2e [test/IRGen] Fix typos 2024-08-09 05:10:02 +03:00
Felipe de Azevedo Piovezan
a321b0afe0 [DebugInfo] Update tests to expect new LLVM debug format 2024-07-23 11:06:12 -07:00
Andrew Savonichev
f3c6eaed28 [DebugInfo] Require 64-bit arch for debug info fragment LIT tests (#67699)
These tests depend on the target layout, and there were issues reported for Android armv7 (see #66744) and watchOS (#66879) targets.
2023-08-10 08:55:48 -07:00
Felipe de Azevedo Piovezan
dc60c07b56 [DebugInfo] Disable failing tests on watchOS
Two new tests were added in #66448, and they both fail for watchOS:

1. debug_fragment_merge.sil fails on 32 bit architectures because the offset
calculation is different for those (fragments of 32 bits, instead of 64).
2. debug_fragment_merge.swift is failing for unknown reasons at this point,
there is simply no SIL debug information generated for the variable "data".
Since the original patch didn't change SILGen, this is not a regression.
2023-06-23 07:17:48 -04:00
Andrew Savonichev
31e4465cd1 [DebugInfo] Merge fragments from SIL with fragments created in IRGen (#66448)
SIL variables can be split by SILSROA into separate allocations, each having
op_fragment expressions in debug_value (VarInfo.DIExpr). These allocations can
be further split by IRGen (multiple values in Storage argument).

These "nested" fragments refer to the same DI variable, so it is important to
merge them for the LLVM IR DI expression. The compiler used to ignore fragment
expressions from SIL when IRGen fragments were also present. This led to
incorrect DI info generation, and for some cases even triggered assertions in
LLVM X86 CodeGen:

  DwarfExpression.cpp:679: void llvm::DwarfExpression::addFragmentOffset(const
  llvm::DIExpression *): Assertion `FragmentOffset >= OffsetInBits &&
  "overlapping or duplicate fragments"' failed.

The patch fixes issue #64642. The LIT test is a reduced reproducer from that issue.
2023-06-20 11:37:29 -07:00