Slava Pestov
5577f27661
AST: Opened existential environments store outer substitutions
2024-08-20 16:54:51 -04:00
Slava Pestov
0c2f28fd3d
AST: Remove GenericSignature parameter from OpenedArchetypeType::get()
2024-08-20 12:15:27 -04:00
Mykola Pokhylets
50b1313175
Merge branch 'main' into mpokhylets/isolated-deinit
...
# Conflicts:
# lib/SILGen/SILGenDistributed.cpp
# lib/Sema/TypeCheckConcurrency.cpp
2024-08-15 16:58:43 +02:00
swift-ci
37c12030dc
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-14 14:56:32 -07:00
Augusto Noronha
00cac25f46
Merge pull request #75847 from augusto2112/keep-unused-getter
...
Eagerly emit getters at Onone.
2024-08-14 14:48:36 -07:00
Augusto Noronha
ae98212c1a
Eagerly emit getters at Onone.
...
Force SILGen to also eagerly emit getters when compiling at Onone.
The reason for this is that getters (even not user-written ones,
generated by result builders) can, and are often called by users
debugging swift programs, and should be available for that reason.
rdar://133329303
2024-08-13 14:53:41 -07:00
swift-ci
6cd717acec
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-12 10:35:39 -07:00
Erik Eckstein
32b53f8bcb
DeinitDevirtualizer: fix an assert crash when creating an alloc_stack
2024-08-12 13:34:50 +02:00
Ben Barham
467e528200
Merge remote-tracking branch 'origin/main' into manual-rebranch-merge
...
Conflicts:
- `lib/Serialization/ModuleFormat.h` bumped version to account for
differences between main and rebranch.
2024-08-09 15:22:39 -07:00
Michael Gottesman
f275c27413
Merge pull request #75810 from gottesmm/pr-48fc81afd13a4e0fdcaaa5badf561845da837f6f
...
Clean up some NDEBUG code errors
2024-08-09 14:20:45 -07:00
Kavon Farvardin
9d69f2bceb
Merge pull request #75382 from kavon/static-branch-prediction
...
Throws Prediction + HotColdSplitting
2024-08-09 15:24:22 -04:00
Michael Gottesman
2e08d6110d
Fix SILBasicBlock::{dump,print}ID so that they are available in no-asserts but just print out NOASSERTS instead of a debug id.
2024-08-09 11:10:37 -07:00
Slava Pestov
375363a473
AST: Move global conformance lookup entry points to ConformanceLookup.h
2024-08-08 23:35:58 -04:00
Kavon Farvardin
0cce602bce
SIL: branch weights for try_apply's
2024-08-08 21:21:52 -04:00
swift-ci
0a7bfc9b5c
Merge remote-tracking branch 'origin/main' into rebranch
2024-08-08 17:15:49 -07:00
Slava Pestov
c321b337ba
SIL: Fix crash with missing existential Sendable conformance
...
If a protocol does not inherit Sendable, we still say that the
existential type is Sendable in Swift 5 mode. Make sure this
doesn't crash the SIL specializer.
Fixes https://github.com/swiftlang/swift/issues/75728
2024-08-08 16:17:16 -04:00
Ben Barham
7bdf1e117e
Merge remote-tracking branch 'origin/main' into manually-merge-main-to-rebranch
...
Conflicts:
- `lib/PrintAsClang/PrintSwiftToClangCoreScaffold.cpp` not positive
what the cause here was, just took main.
2024-08-06 13:44:27 -07:00
Erik Eckstein
345f9c1dfc
AliasAnalysis: handle destroy_value [dead_end] in computeMemoryEffect
...
We don't have to take deinit effects into acount for a `destroy_value [dead_end]`.
Such destroys are lowered to no-ops and will not call any deinit.
2024-08-05 17:02:06 +02:00
swift-ci
7ef1bb2252
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-31 15:36:10 -07:00
Alexis Laferrière
f458c56143
Revert one line from "SILBuilder: use the new ASSERT macro in the SILBuilder"
...
From commit bf3b69bba8 .
installedOverride refers to something protected behind an `#ifndef NDEBUG`.
rdar://132930970
2024-07-31 14:53:38 -07:00
swift-ci
4cc51f897a
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-31 10:15:18 -07:00
Erik Eckstein
bf3b69bba8
SILBuilder: use the new ASSERT macro in the SILBuilder
...
It's important to catch assert failures in the SILBuilder also in a release build of the compiler
2024-07-31 15:31:03 +02:00
swift-ci
74c720b622
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-29 22:34:22 -07:00
Erik Eckstein
031f23547a
SILType: remove the now obsolete aggregateContainsRecord function
2024-07-29 17:33:46 +02:00
Erik Eckstein
084d60d7b7
Swift SIL: add some APIs to instructions and other small improvments
2024-07-29 17:33:44 +02:00
Erik Eckstein
4c49e0039b
Verifier: in the swift verifier call the bridged C++ verificationFailure function in case of a failure
...
This brings all the nice verifier features to the swift verifier, like printing the surrounding instructions in case of a failure, etc.
2024-07-29 17:33:43 +02:00
Erik Eckstein
95bd329b1f
Swift SIL: bridge the hasPointerEscape flags of MoveValueInst and BeginBorrowInst
2024-07-29 17:33:43 +02:00
Erik Eckstein
04e0907ab0
SIL: rename Type.instanceTypeOfMetatype -> Type.loweredInstanceTypeOfMetatype
...
The same for SILType
It needs to be made clear that this is not the "original", but the lowered SIL type.
NFC
2024-07-29 17:33:36 +02:00
swift-ci
2f07d52ed2
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-26 20:35:41 -07:00
Andrew Trick
25825e25ee
SwiftCompilerSources: use Type.isVoid instead of Type.isEmpty.
2024-07-26 17:32:23 -07:00
swift-ci
8f7c33c6a1
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-26 16:33:56 -07:00
Andrew Trick
3316a58ba7
Allow move_value of trivial values.
...
Required for SIL level local variable scopes.
2024-07-26 08:27:31 -07:00
Andrew Trick
075d3a42c1
Add SILValue::isFromVarDecl utility.
2024-07-26 08:27:31 -07:00
swift-ci
3419f76e4f
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-26 01:33:19 -07:00
Konrad `ktoso` Malawski
eb675c222e
[Distributed] Correct tbd handling for distributed thunks ( #74935 )
2024-07-26 16:52:18 +09:00
swift-ci
6c22b2307d
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-25 19:43:11 -07:00
Nate Chandler
549b4a8bd9
[Test] Tweaked comment.
2024-07-25 13:52:21 -07:00
swift-ci
d33355dca4
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-24 08:54:01 -07:00
Erik Eckstein
b739c6263b
WalkUtils: handle unsafe_ref_cast which casts between AnyObject and a class
...
We need to ignore such casts because otherwise the constructed walking path wouldn't contain the right `existential` field kind.
Fixes a miscompile caused by redundant load elimination.
rdar://132364917
2024-07-24 11:35:08 +02:00
swift-ci
7203e893f7
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-23 21:14:07 -07:00
Nate Chandler
812891cf81
[NFC] PrunedLiveness: Clarified boundary API.
...
When checking whether an instruction is contained in a liveness
boundary, a pointer to a DeadEndBlocks instance must always be passed.
When the pointer is null, it is only checked that the instruction occurs
within the direct live region. When the pointer is non-null, it is
checked whether the instruction occurs within the region obtained by
extending the live region up to the availability boundary within
dead-end regions that are adjacent to the non-lifetime-ending portion of
the liveness boundary.
2024-07-23 13:38:35 -07:00
swift-ci
80f3a32db1
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-23 13:13:20 -07:00
Nate Chandler
e0da318129
[PrunedLiveness] Fix extended boundary check.
...
The areUsesWithinBoundary/areUsesOutsideBoundary methods take the
dead-ends because the region that they're checking for containment
within contains more than just (is a (non-strict) superset of) the
pruned live region. On the other hand, the region also contains _less_
than (is a (non-strict) subset of) the available region. Instructions
are in this extended region only if they're in a dead-end block which is
forwards reachable from the non-lifetime-ending liveness boundary.
2024-07-22 21:51:34 -07:00
swift-ci
0b785e57a7
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-19 02:34:28 -07:00
Michael Gottesman
ae797d43e9
[region-isolation] Propagate through the whole source operand instead of just the representative of the source value when constructing assign and merge.
...
This will let me know the exact source operand used instead of the source value
representative. This will ensure that the name associated with the diagnostic is
not of the representative value, but the actual value that was the source of the
assign.
This is an NFCI commit that is an algebraic refactor.
2024-07-18 21:28:22 -07:00
Mykola Pokhylets
816d62c972
Merge remote-tracking branch 'upstream/main' into mpokhylets/isolated-deinit
...
# Conflicts:
# include/swift/Basic/Features.def
# lib/SILGen/SILGenDestructor.cpp
# test/Concurrency/flow_isolation.swift
# test/abi/macOS/arm64/concurrency.swift
# test/abi/macOS/x86_64/concurrency.swift
2024-07-11 13:11:59 +02:00
Mykola Pokhylets
28a06feaad
Added isolated deallocator to TBDGen
2024-07-11 13:09:06 +02:00
Mykola Pokhylets
b189495518
Introduced isolated deinit as a SIL entity
2024-07-11 13:09:05 +02:00
swift-ci
a32c1896dc
Merge remote-tracking branch 'origin/main' into rebranch
2024-07-10 23:09:47 -07:00
Andrew Trick
12acde2215
Merge pull request #75096 from meg-gupta/lifetimedeparg
...
Add support for lifetime dependence in parameter position
2024-07-10 22:56:23 -07:00