Commit Graph

37 Commits

Author SHA1 Message Date
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
Shubham Sandeep Rastogi
b14e8f0679 Fixup swift tests for DIExpression folding in Corosplit
The support for DIExpression constant folding has been added to the
Corosplit pass, this patch fixes up the swift tests that need to account
for the changes in the DIExpressions.
2024-09-10 15:02:02 -07:00
Felipe de Azevedo Piovezan
a321b0afe0 [DebugInfo] Update tests to expect new LLVM debug format 2024-07-23 11:06:12 -07: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
38467355cf Update testcases on rebranch.
rdar://102151684
2022-12-21 15:08:15 -08:00
Adrian Prantl
0946844cbe Revert "tests: temporarily disable DebugInfo tests which are failing in rebranch"
This reverts commit f4254438a2.
2022-12-21 12:32:45 -08:00
Erik Eckstein
f4254438a2 tests: temporarily disable DebugInfo tests which are failing in rebranch
rdar://102151684
2022-12-01 15:26:27 +01:00
Adrian Prantl
2a74582de4 Update test for llvm change D109119
rdar://82037718
2021-09-01 18:20:01 -07:00
Adrian Prantl
c40b8f38b8 Update IRGenDebugInfo for LLVM D95617.
In https://reviews.llvm.org/D95617 LLVM stopped to emit debug values without a
location as an optimization for inlined functions. Because Swift is emitting
dbg.values(undef) for sizeless variables even at -Onone, we need to make sure
all local variables are preserved even at -Onone.

rdar://82038523
2021-08-20 12:57:23 -07:00
Adrian Prantl
cbb89c78de Remove an extra load that was generated for coro shadow copies.
emitShadowCopyIfNeeded has some extra code that was added when function
arguments were moved out of the async context to ensure that they are being
lifetime-extended, and there is also code that generates an incorrect load from
the shadow copy. However, emitShadowCopyIfNeeded is supposed return either an
alloca or the value, and IRGenDebugInfo knows to describe the value in the
alloca already. The load is counterproductive it's only valid until whatever
register it ends up in is clobbered, whereas the alloca is valid throughout the
function.

This patch removes the load and updates the tests accordingly.

rdar://81805727
2021-08-13 14:39:07 -07:00
Adrian Prantl
ec913af429 Revert "Updated async debug info tests for upstream IR changes"
This reverts commit 63bd700d70.
2021-08-13 14:37:20 -07:00
Adrian Prantl
63bd700d70 Updated async debug info tests for upstream IR changes 2021-08-13 14:35:26 -07:00
Doug Gregor
eeeea49764 Remove -enable-experimental-concurrency almost everywhere. 2021-07-26 21:24:43 -07:00
Doug Gregor
1e2012d816 Disable availability checking in tests that use concurrency 2021-07-20 12:46:26 -07:00
Richard Wei
fb66de6126 Unify mangling operators for async, @Sendable, @differentiable and @noDerivative.
Repurpose mangling operator `Y` as an umbrella operator that covers new attributes on function types. Free up operators `J`, `j`, and `k`.

```
async ::= 'Ya'                             // 'async' annotation on function types
sendable ::= 'Yb'                          // @Sendable on function types
throws ::= 'K'                             // 'throws' annotation on function types
differentiable ::= 'Yjf'                   // @differentiable(_forward) on function type
differentiable ::= 'Yjr'                   // @differentiable(reverse) on function type
differentiable ::= 'Yjd'                   // @differentiable on function type
differentiable ::= 'Yjl'                   // @differentiable(_linear) on function type
```

Resolves rdar://76299796.
2021-04-07 17:49:10 -07:00
Arnold Schwaighofer
f7b4c7df07 Adjust tests to new resume partial function mangling 2021-03-19 07:26:43 -07:00
adrian-prantl
b0472a8728 Revert "Disable tests on arm64e" 2021-03-17 18:22:13 -07:00
Arnold Schwaighofer
5b4e0566b9 [IRGen] Fix debug info for direct arguments/return values
Emit shadow copies in async functions and emit a load to get the value.
2021-03-17 07:41:10 -07:00
John McCall
6c879d6fd3 Change the async ABI to not pass the active task and executor.
Most of the async runtime functions have been changed to not
expect the task and executor to be passed in.  When knowing the
task and executor is necessary, there are runtime functions
available to recover them.

The biggest change I had to make to a runtime function signature
was to swift_task_switch, which has been altered to expect to be
passed the context and resumption function instead of requiring
the caller to park the task.  This has the pleasant consequence
of allowing the implementation to very quickly turn around when
it recognizes that the current executor is satisfactory.  It does
mean that on arm64e we have to sign the continuation function
pointer as an argument and then potentially resign it when
assigning into the task's resume slot.

rdar://70546948
2021-03-16 22:52:54 -04:00
Adrian Prantl
f9a8a71652 Disable tests on arm64e 2021-02-23 09:58:17 -08:00
swift-ci
e854ac4f62 Merge pull request #36042 from adrian-prantl/74460135 2021-02-20 01:11:07 -08:00
Erik Eckstein
a894fabfb1 disable DebugInfo/async-args.swift
It fails on CI

rdar://74551043
2021-02-20 09:16:41 +01:00
Adrian Prantl
582bbbdbd9 Add debug info support for direct async arguments.
rdar://74460135
2021-02-19 15:48:59 -08:00
Nate Chandler
64678ba409 [Test] Adapt DebugInfo/async-args for more archs. 2021-02-08 12:18:06 -08:00
Rintaro Ishizaki
c70d376a3a [Test] Disable a test while investigating
rdar://problem/73983938
2021-02-08 10:29:30 -08:00
Daniel Rodríguez Troitiño
9e90cc184e [android][test] Duplicate arm64 to aarch64 for other ARM64 platforms.
Other ARM64 platforms use aarch64 as the architecture name (Android,
Linux), so the checks have to be duplicated, or the final checks of the
file will fail to find the patterns set before.
2021-02-05 22:03:28 -08:00
Nate Chandler
1c2ab37c6f [Test] Adapt DebugInfo/async-args for arm64e. 2021-02-04 14:44:23 -08:00
swift-ci
d9e93a5672 Merge remote-tracking branch 'origin/main' into rebranch 2021-01-28 21:12:32 -08:00
Nate Chandler
798f86981f [Test] Replaced runAsyncAndBlock with async @main.
The last outstanding usage is in

    Concurrency/Runtime/checked_continuation.swift
2021-01-28 17:14:55 -08:00
Adrian Prantl
bf56370fb7 Re-enable async argument debug info test.
rdar//7247369
2021-01-28 12:44:15 -08:00
swift-ci
9d0d1fff60 Merge remote-tracking branch 'origin/main' into rebranch 2021-01-26 06:12:31 -08:00
Arnold Schwaighofer
daa72d3cc5 Add llvm::Attribute::SwiftAsync to the context parameter
* Adds support for generating code that uses swiftasync parameter lowering.

* Currently only arm64's llvm lowering supports the swift_async_context_addr intrinsic.

* Add arm64e pointer signing of updated swift_async_context_addr.

This commit needs the PR llvm-project#2291.

* [runtime] unittests should use just-built compiler if the runtime did

This will start to matter with the introduction of usage of swiftasync parameters which only very recent compilers support.

rdar://71499498
2021-01-22 10:01:55 -08:00
Alexis Laferrière
e47a3788e5 [Tests] Xfail DebugInfo/async-args.swift 2021-01-21 11:33:20 -08:00
David Zarzycki
f80a1f93d4 [Testing] Add missing REQUIRES: concurrency 2020-12-15 07:07:04 -05:00
Adrian Prantl
0e6a0b84d1 Add debug info support for function arguments in async functions.
This commit depends on changes to the coroutine-splitting pass in LLVM.  Shadow
copies are also turned off for async function arguments, because they make it
impossible to track debug info during coroutine splitting. Instead we are
relying on LLVM's CoroSplit.cpp to emit shadow copies. The Swift frontend gives
CoroSplit license to move do this by describing the arguments using a
dbg.declare intrinsic, even though it points to chain of load/GEP/bitcase
instructions into the Swift context function argument.

rdar://71866936
2020-12-11 16:59:09 -08:00