Skip to content

Resolve conflicts with the main branch #2222

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

Merged
merged 115 commits into from
Nov 16, 2020
Merged

Conversation

MaxDesiatov
Copy link

No description provided.

jckarter and others added 30 commits November 3, 2020 08:28
Immediately before invoking the ObjC API, get the current continuation, capture it into a block to
pass as the completion handler, and then await the continuation, whose resume/error successors
serve as the semantic return/throw result of the call. This should complete the caller-side part
of SILGen; the completion handler block implementation is however still only a stub.
…time.

To manage code size in user binaries, we want to be able to implement common completion handler signatures in
the Swift runtime once. Using a different mangling for these lets us add new ones without clobbering symbols in
existing binaries.
The LICM algorithm was not robust with respect to address projection
because it identifies a projected address by its SILValue. This should
never be done! Use AccessPath instead.

Fixes regressions caused by rdar://66791257 (Print statement provokes
"Can't unsafeBitCast between types of different sizes" when
optimizations enabled)
This completes the work on <rdar://problem/35158274>, and also
adds a test case for <rdar://problem/50627401>.
Add dependencies and output to the diagnostic-database target so that
it's not re-run every time swift-frontend is compiled.
The only available method to check for features at the moment is through
version checks. This is errorprone and doesn't work well for OSS
toolchains or locally built compilers.

features.json is intended to communicate to build systems that a new
flag is available, in order to assist with a transitional period where
not all supported toolchains may have a particular flag. It is *not*
intended to be a comprehensive report of all flags available.

Note that the names are intended to be features, so while they may match
up to the corresponding flag name, this isn't necessarily the case.
SILGen: Caller-side codegen for invoking foreign async functions
Also remove the original implementation from GenClangType.cpp
since it isn't used anymore.
T *const does not prevent logically non-const accesses to the underlying data, it merely indicates that the pointer value itself is const. This modifier can be cast off by a copy, so it's not generally what you want here. Switch to const T * instead.
…en/test-thin_to_thick

[Async CC] Add execution test for thin_to_thick.
[android] Add support for x86_64 arch
…ability-solution-ranking

Sema: Check conformance availability when ranking solutions
This ought to afford more specific traces when a null type is actually propagated out of the branches. As an added benefit, we no longer have to check for the null type when making recursive calls into type resolution and will now recieve a compile-time error when such a comparison is attempted.
In swiftlang#34693, we discovered the SIL parser can silently fail. Try to detect
this in +asserts builds.
…n mode. (swiftlang#34704)

AD-generated data structures (linear map structs and branching trace enums) do not need to be resilient data structures. These decls ade missing a `@frozen` attribute.

Resolves rdar://71319547.
For combined load-store hoisting, split loads that contain the
loop-stored value into a single load from the same address as the
loop-stores, and a set of loads disjoint from the loop-stores. The
single load will be hoisted while sinking the stores to the same
address. The disjoint loads will be hoisted normally in a subsequent
iteration on the same loop.

loop:
  load %outer
  store %inner1
exit:

Will be split into

loop:
  load %inner1
  load %inner2
  store %inner1
exit:

Then, combined load/store hoisting will produce:

  load %inner1
loop:
  load %inner2
exit:
  store %inner1
This frontend flag can be used as an alternative to
-experimental-skip-non-inlinable-function-bodies that doesn’t skip
functions defining nested types. We want to keep these types as they are
used by LLDB. Other functions ares safe to skip parsing and
type-checking.

rdar://71130519
[NFC] Spin Off Dependency Tracing Utilities From FrontendTool
DougGregor and others added 26 commits November 14, 2020 15:18
Use a single atomic for the wait queue that combines the status with
the first task in the queue. Address race conditions in waiting and
completing the future.

Thanks to John for setting the direction here for me.
Reduce the size of AsyncTask by using the first slot of SchedulerPrivate
for the next waiting task. Thanks, John!
There isn't a big advantage to keeping "simple" task as a separate
concept from a task. Tasks may or may not have futures.
Introduce `FutureAsyncContext` to line up with the async context formed
by IR generation for the type `<T> () async throws -> T`. When allocating
a future task, set up the context with the address of the future's storage
for the successful result and null out the error result, so the caller
will directly fill in the result. This eliminates a bunch of extra
complexity and a copy.
…mber.

'const' breaks compilation on newer compilers.
As part of concurrency bringup, some workarounds were put in place to
enable the async cc execution tests to continue to run while enabling
async function SIL verification (specifically, that an async function
must be called from an async function) to land before we have the
Task.runDetached mechanism.  Specifically, these workaround allow @main
to be annotated @async but continue to be emitted as if it were not
@async.

Now that we have a better mechanism in the form of runAsync, use that
instead.

rdar://problem/70597390
…en/call-run-async-from-five-bools

[Test] Use runAsync to invoke async cc test.
…uture

[Concurrency] Implement basic runtime support for task futures.
…en/rdar71260862

[Async CC] Resolve metadata from class instances.
…en/rdar70597390

[Async CC] Unroll workaround where @main was async.
…VectorImpl<SILInstruction *>

Otherwise, one is always forced to use ValueLifetimeAnalysis::Frontier, a
SmallVector<SILInstruction *, 4>. This may not be a size appropriate for every
problem, so it makes sense to provide Frontier as a good rule of thumb, but use
FrontierImpl on the actual API boundary to loosen the constraint if the user
wishes to do so.
A reborrow occurs when a Borrowing Operand ends the lifetime of a borrowed value
and propagates forward a new guaranteed value that continues the guaranteed
lifetime of the value.
This simplifies the representation and if one wants to truly get an owned value
from an undef, just copy the undef value.
…6870a894a758dddd7d4ab42

[ownership] Make SILUndef always have ValueOwnershipKind::None.
…eaa8382b52e2426359a389e

[ownership] Centralize the concept of isReborrow on BorrowingOperand.
…f3586659fcb455ab9ed507d

[sil][value-lifetime] Add ValueLifetimeAnalysis::FrontierImpl = SmallVectorImpl<SILInstruction *>
…b87ece1fc46b74931415542

[value-lifetime] Cleanup constructors.
# Conflicts:
#	utils/build-script
#	utils/build-script-impl
@kateinoigakukun kateinoigakukun merged commit ad75aa3 into swiftwasm Nov 16, 2020
@MaxDesiatov MaxDesiatov deleted the maxd/main-merge branch November 16, 2020 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.