-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[concurrency] Create builtins for invoking specific concurrency runtime functions. #85224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5cb2409
1711ef2
97b0e2e
48b253d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2660,6 +2660,72 @@ FUNCTION(TaskGroupDestroy, | |
| EFFECT(RuntimeEffect::Concurrency), | ||
| UNKNOWN_MEMEFFECTS) | ||
|
|
||
| // CancellationNotificationStatusRecord* | ||
| // swift_task_addCancellationHandler( | ||
| // CancellationNotificationStatusRecord::FunctionType handler, | ||
| // void *context); | ||
| FUNCTION(TaskAddCancellationHandler, | ||
| _Concurrency, swift_task_addCancellationHandler, SwiftCC, | ||
| ConcurrencyAvailability, | ||
| RETURNS(Int8PtrTy), | ||
| ARGS(Int8PtrTy, Int8PtrTy), | ||
| ATTRS(NoUnwind), | ||
| EFFECT(RuntimeEffect::Concurrency), | ||
| UNKNOWN_MEMEFFECTS) | ||
|
|
||
| // void swift_task_removeCancellationHandler( | ||
| // CancellationNotificationStatusRecord *record); | ||
| FUNCTION(TaskRemoveCancellationHandler, | ||
| _Concurrency, swift_task_removeCancellationHandler, SwiftCC, | ||
| ConcurrencyAvailability, | ||
| RETURNS(VoidTy), | ||
| ARGS(Int8PtrTy), | ||
| ATTRS(NoUnwind), | ||
| EFFECT(RuntimeEffect::Concurrency), | ||
| UNKNOWN_MEMEFFECTS) | ||
|
|
||
| // EscalationNotificationStatusRecord* | ||
| // swift_task_addPriorityEscalationHandler( | ||
| // EscalationNotificationStatusRecord::FunctionType handler, | ||
| // void *context); | ||
| FUNCTION(TaskAddPriorityEscalationHandler, | ||
| _Concurrency, swift_task_addPriorityEscalationHandler, SwiftCC, | ||
| ConcurrencyAvailability, | ||
| RETURNS(Int8PtrTy), | ||
| ARGS(Int8PtrTy, Int8PtrTy), | ||
| ATTRS(NoUnwind), | ||
| EFFECT(RuntimeEffect::Concurrency), | ||
| UNKNOWN_MEMEFFECTS) | ||
|
|
||
| // void swift_task_removePriorityEscalationHandler( | ||
| // EscalationNotificationStatusRecord *record); | ||
| FUNCTION(TaskRemovePriorityEscalationHandler, | ||
| _Concurrency, swift_task_removePriorityEscalationHandler, SwiftCC, | ||
| ConcurrencyAvailability, | ||
| RETURNS(VoidTy), | ||
| ARGS(Int8PtrTy), | ||
| ATTRS(NoUnwind), | ||
| EFFECT(RuntimeEffect::Concurrency), | ||
| UNKNOWN_MEMEFFECTS) | ||
|
|
||
| // void swift_task_localValuePush(const HeapObject *key, | ||
| // /* +1 */ OpaqueValue *value, | ||
| // const Metadata *valueType); | ||
| FUNCTION(TaskLocalValuePush, _Concurrency, swift_task_localValuePush, SwiftCC, | ||
| ConcurrencyAvailability, RETURNS(), | ||
| ARGS(RefCountedPtrTy, OpaquePtrTy, TypeMetadataPtrTy), ATTRS(NoUnwind), | ||
| EFFECT(RuntimeEffect::Concurrency), UNKNOWN_MEMEFFECTS) | ||
|
|
||
| // void swift_task_localValuePop(); | ||
| FUNCTION(TaskLocalValuePop, | ||
| _Concurrency, swift_task_localValuePop, SwiftCC, | ||
| ConcurrencyAvailability, | ||
| RETURNS(), | ||
| ARGS(), | ||
| ATTRS(NoUnwind), | ||
| EFFECT(RuntimeEffect::Concurrency), | ||
| UNKNOWN_MEMEFFECTS) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To double check if I remember this right: that's the actual bit that'll prevent accidental reordering of the builtin right? since we don't know the effect -> cannot optimize/move safely.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes |
||
|
|
||
| // AutoDiffLinearMapContext *swift_autoDiffCreateLinearMapContextWithType(const Metadata *); | ||
| FUNCTION(AutoDiffCreateLinearMapContextWithType, | ||
| Swift, swift_autoDiffCreateLinearMapContextWithType, SwiftCC, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.