Commit Graph

9 Commits

Author SHA1 Message Date
Felipe de Azevedo Piovezan
b58df184d5 [DebugInfo][[test] Fix incorrect CHECK lines on 32-bit architectures
A previous commit added a check for a store of `i32`, which would not
work for 32-bit targets. In order to avoid having multiple test, this
commit addresses the issue by requiring a 64-bit architecture for the
target. This follows the example of other async debug info tests.
2024-11-19 08:21:45 -08:00
Felipe de Azevedo Piovezan
f7f869c88d [DebugInfo] Don't inherit debug location of previous instruction
Prior to this commit, when lowering SIL instructions that should are
"hidden" for the purposes of debugging, the compiler just attaches the
location of the previous instruction in the name of keeping a simpler
line table.

However, this is wrong for many reasons. One such reason is this: at the
start of a basic block, inheriting the previous debug location will
almost certainly cause the instruction to have a random location in the
code, as it will depend on whatever BB was visited previously.

Other examples can be seen in the tests affect by this commit, which
changes lowering to use Line 0 instead of the line number of the
previous instruction.

CodeView doesn't handle line 0 the same way DWARF does, so this commit
preserves the old behavior for the CodeView path.

The test changes here are effectively undoing some of the diffs from
158772c2ab.

rdar://139826231&110187845
2024-11-18 10:23:41 -08:00
swift-ci
6ea9995a81 Merge remote-tracking branch 'origin/main' into rebranch 2024-10-19 18:57:20 -07:00
Allan Shortlidge
cb578172ea Tests: Remove -disable-availability-checking in more tests that use concurrency.
Use the `%target-swift-5.1-abi-triple` substitution to compile the tests for
deployment to the minimum OS versions required for use of _Concurrency APIs,
instead of disabling availability checking.
2024-10-19 12:35:20 -07:00
Felipe de Azevedo Piovezan
58bbadd28e [DebugInfo] Dont generate line information at the split point of async funclets
Unless there is some meaningful code on the same line as an await call (e.g.
other parts of an expression), there should be no additional line entries
associated with that line on the continuation funclet.

This patch changes codegen to avoid emitting debug location for the "prologue" code
at the start of a funclet, instead of simply copying the debug location of the
split point.
2024-09-13 19:06:56 -07:00
Arnold Schwaighofer
bc81d23102 IRGen: Mark async intrinsic helper functions as always inline
github.com/apple/swift/issues/68708
rdar://115905828
2024-02-06 11:09:06 -08:00
Felipe de Azevedo Piovezan
1ed9df0a0c [DebugInfo] Update tests to use opaque ptrs 2023-06-16 15:05:44 -04:00
Arnold Schwaighofer
c1a93e0bde Move tests over to use the %use_no_opaque_pointers option 2023-06-14 10:49:48 -07:00
Adrian Prantl
7c1c7b6249 Emit debug locations for hop_to_executor instructions.
The function prologue of async funclets inherits its source location
from the hop_to_executor instruction. This makes it easier to produce
logical backtraces, since the PC in logical frames will always point
to the start if the function.

rdar://89776340
2022-06-23 09:40:25 -07:00