Commit Graph

4421 Commits

Author SHA1 Message Date
Philip Turner
0b66effef3 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 03:11:26 -08:00
Philip Turner
4bf4319780 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 03:11:05 -08:00
Philip Turner
c4be673570 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 03:10:42 -08:00
Philip Turner
74ec80aba7 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 03:10:28 -08:00
Philip Turner
62ed891398 Update docs/DifferentiableProgrammingImplementation.md
I was thinking of removing this since I didn't include it in the table of contents.

Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 03:10:20 -08:00
Philip Turner
485a486f92 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 03:09:41 -08:00
Philip Turner
85ef3fd571 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 03:08:14 -08:00
Philip Turner
3eae0ceeff Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 03:07:57 -08:00
Philip Turner
a049127b05 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 03:07:42 -08:00
Philip Turner
b338fa4a92 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 03:07:33 -08:00
Philip Turner
54d130de2b Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 03:07:13 -08:00
Philip Turner
b7c4e87e77 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 03:06:53 -08:00
Philip Turner
993c5c4424 Update DifferentiableProgramming.md 2021-12-07 06:06:06 -05:00
Philip Turner
1a3a01c929 Update DifferentiableProgramming.md 2021-12-06 20:10:48 -05:00
Philip Turner
60cebc9635 Update DifferentiableProgrammingImplementation.md 2021-12-06 20:05:12 -05:00
Philip Turner
d1fdeeaecd Rename DifferentiableProgrammingImplementation to DifferentiableProgrammingImplementation.md 2021-12-06 20:04:51 -05:00
Philip Turner
b50bbed22e Delete temp.md 2021-12-06 20:04:38 -05:00
Philip Turner
eedb4817ba Add files via upload 2021-12-06 17:04:28 -08:00
Philip Turner
a61156f518 Create temp.md 2021-12-06 20:04:10 -05:00
Philip Turner
3bc6dbd618 Delete differentiation-control-flow.png 2021-12-06 20:03:27 -05:00
Philip Turner
2d74972a20 Delete swift-compilation-pipeline.png 2021-12-06 20:03:20 -05:00
Philip Turner
229c0ad770 Create DifferentiableProgrammingImplementation 2021-12-06 20:03:01 -05:00
Philip Turner
be55947456 Add files via upload 2021-12-06 17:00:10 -08:00
Philip Turner
1724539252 Delete the-swift-compilation-pipeline.png 2021-12-06 19:59:53 -05:00
Philip Turner
ee9807b9c9 Add files via upload 2021-12-06 16:59:24 -08:00
Philip Turner
7883a22cb3 Add files via upload 2021-12-06 16:58:36 -08:00
Evan Wilde
cce3e8a7f5 Merge pull request #40149 from etcwilde/ewilde/concurrency/underscored-unavailablefromasync
Add `_unavailableFromAsync` attribute
2021-12-06 12:38:53 -08:00
swift-ci
632c5ca835 Merge pull request #40410 from philipturner/patch-3 2021-12-03 22:15:47 -08:00
Philip Turner
6cf5327348 Fix typo in Differentiable Programming Manifesto 2021-12-03 19:37:29 -05:00
Philip Turner
a79877c2e1 Fix typo in Differentiable Programming Manifesto 2021-12-03 19:26:29 -05:00
Evan Wilde
d99e3318db Add implementation of _unavailableFromAsync check
The core part of the check runs as follows
 1. Are we in an async context
 2. Does the decl we're calling have the unavailableFromAsync attribute
 3. Emit a diagnostic

There are a couple challenges that muddy the implementation. First,
single-expression closures are typechecked differently than
multi-expression closures. The single-expression closure is never added
to the closure stack. We have to record it separately upon entry to
verify separately. This is necessary for `_ = { foo() }()` where `foo`
is unavailable from async, and the surrounding context is async.

The second challenge is regarding when things get typechecked. A type
must be assigned to AbstractClosureExprs to determine whether they are
an async context or not. Unfortunately, availability checking runs
before types are fully assigned in some cases. This specifically happens
when working with result builders in specific conditions. I haven't been
able to figure out how to reduce the issue further.
2021-11-30 14:20:21 -08:00
Michael Gottesman
775c632d03 Merge pull request #39232 from keith/ks/add-note-about-match-timestamp-for-bisects
Add note about --match-timestamp for bisects
2021-11-30 10:01:38 -08:00
buttaface
30c292ca87 [android] Update to NDK 23b (#39921)
The latest Long Term Support NDK finally removed binutils, including the bfd/gold
linkers and libgcc. This simplifies our Android support, including making lld the
default linker for Android. Disable three reflection tests that now fail, likely
related to issues with swift-reflection-dump and switching to lld.
2021-11-17 20:58:42 -08:00
Andrew Trick
90c0c8b60f Add rebind_memory SIL instruction.
Required for UnsafeRawPointer.withMemoryReboud(to:).

%out_token = rebind_memory %0 : $Builtin.RawPointer to %in_token

%0 must be of $Builtin.RawPointer type

%in_token represents a cached set of bound types from a prior memory state.

%out_token is an opaque $Builtin.Word representing the previously bound
types for this memory region.

This instruction's semantics are identical to ``bind_memory``, except
that the types to which memory will be bound, and the extent of the
memory region is unknown at compile time. Instead, the bound-types are
represented by a token that was produced by a prior memory binding
operation. ``%in_token`` must be the result of bind_memory or
2021-11-14 22:44:46 -08:00
Andrew Trick
17fef2fb1e Give bind_memory a token result.
Required for UnsafeRawPointer.withMemoryRebound(to:)

%token = bind_memory %0 : $Builtin.RawPointer, %1 : $Builtin.Word to $T

%0 must be of $Builtin.RawPointer type

%1 must be of $Builtin.Word type

%token is an opaque $Builtin.Word representing the previously bound types
for this memory region.
2021-11-14 22:04:46 -08:00
Slava Pestov
76361d9289 RequirementMachine: Preliminary design doc 2021-11-09 13:59:16 -05:00
Karoy Lorentey
8e154a415a Merge pull request #39962 from lorentey/concurrency-availability
[stdlib] Introduce availability macros
2021-10-31 14:23:57 -07:00
Michael Gottesman
f9122a79b7 [moveOnly] Implement a new _copy function that performs an explicit copy value.
The key thing is that the move checker will not consider the explicit copy value
to be a copy_value that can be rewritten, ensuring that any uses of the result
of the explicit copy_value (consuming or other wise) are not checked.

Similar to the _move operator I recently introduced, this is a transparent
function so we can perform one level of specialization and thus at least be
generic over all concrete types.
2021-10-29 15:37:46 -07:00
Karoy Lorentey
b6f0b6da3b [stdlib][docs] Describe availability macros in the stdlib programmer's manual 2021-10-28 19:10:28 -07:00
Erik Eckstein
8229b374b1 Performance annotations: add attributes @_noLocks and @_noAllocation 2021-10-28 18:43:14 +02:00
Michael Gottesman
a589b4a128 [moveOnly] Add an @_noImplicitCopy decl attribute and allow it to be only attached to local lets.
Some notes:

1. This is not actually wired up to any part of codegen. Instead, this PR just
has the code necessary to parse the attribute and to ensure that we use it only
on local lets. The rest will come in subsequent commits.

2. I am allowing for the attribute to be attached to generic things in Sema
since we do not have enough information in the TypeChecker to distinguish in
between structs with a type parameter but that have all non-generic stored vars
from one with generic stored vars. We can only support the later with opaque
values but the former we can support without opaque values (and is one of the
use cases we are interested in).

rdar://83957088
2021-10-26 13:00:54 -07:00
mikun
4c612209d5 Fix typo 2021-10-18 11:37:31 +08:00
Saleem Abdulrasool
15a5d2c54b Revert "[android] Update to NDK 23" 2021-10-16 11:07:23 -07:00
swift-ci
1d93818a42 Merge pull request #39787 from ktoso/distributed-func-in-actor-extension 2021-10-16 06:05:23 -07:00
Doug Gregor
142973b653 Use a non-conflicting mangling for distributed thunks.
Distributed thunks were using the same mangling as direct method
reference thunks (i.e., for "super" calls). Although not technically
conflicting so long as actors never gain inheritance, it's confusing
and could cause problems in the future. So, introduce a distinct
mangling for distributed thunks and plumb them through the demangling
and remangler.
2021-10-15 23:15:43 -07:00
swift-ci
46f3cc9dd8 Merge pull request #39045 from buttaface/android-ndk-23 2021-10-15 20:55:19 -07:00
Becca Royal-Gordon
354f3470a0 Add @_nonSendable decl attribute
This attribute creates an unavailable extension with a `Sendable` conformance so that the type is explicity marked as not being `Sendable`.

We also fully suppress diagnostics about unavailable Sendable conformances in Swift 5 mode code. (This is not fully developed yet—it should return to being a warning in concurrent contexts.)

The behavior when a @_nonSendable and a Sendable conformance are both on the same type is also not right yet.
2021-10-14 12:14:46 -07:00
Butta
7fa1b4b2ac [android] Update to NDK 23
The latest Long Term Support NDK finally removed binutils, including the bfd/gold
linkers and libgcc. This simplifies our Android support, including making lld the
default linker for Android. Disable three reflection tests that now fail, likely
related to issues with swift-reflection-dump and switching to lld.

Also, add the libatomic dependency for Android armv7, just as on linux.
2021-10-12 12:37:01 +05:30
Erik Eckstein
7849f09e52 SIL: remove the unused alloc_value_buffer, project_value_buffer and dealloc_value_buffer instructions.
Those instructions were use for the materializeForSet implementation, which was replaced by modify-coroutines.
2021-10-07 07:41:54 +02:00
Karoy Lorentey
87cfcb8e1a [doc][stdlib] Minor edits 2021-10-06 14:59:18 -07:00