Skip to content

Fix conflicts merging main into next #66937

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 285 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
285 commits
Select commit Hold shift + click to select a range
934ec10
[Basic] Removed spurious req from FrozenMultiMap.
nate-chandler Jun 16, 2023
f4d8761
ModuleLoader: minor clean-up to remove dead code. NFC
nkcsgexi Jun 16, 2023
40ad5aa
DefiniteInitialization: Error when noncopyable types are conditionall…
jckarter Jun 17, 2023
36451ef
require `consume x` for noncopyable pattern bindings since they're co…
kavon Jun 16, 2023
874b577
[IRGen] Use EnumImplStrategy to generate getEnumTag function for layo…
drexin Jun 17, 2023
b8a073c
[Macros] Create plugin search lookup table.
rintaro Jun 16, 2023
4e5ff2c
Merge pull request #66495 from karwa/patch-16
rjmccall Jun 17, 2023
ca29d53
Merge pull request #66716 from nate-chandler/rdar110913116
nate-chandler Jun 17, 2023
6709648
Merge pull request #66713 from kavon/require-switch-consume
swift-ci Jun 17, 2023
f4e3292
[FieldSensitivePL] Fix vectorization.
nate-chandler Jun 16, 2023
b97712c
[MoveOnlyAddressChecker] NFC: Promoted assertion.
nate-chandler Jun 8, 2023
eaf4560
[MoveOnlyAddressChecker] Maximize lifetimes.
nate-chandler Jun 12, 2023
11443f2
[move-only] Avoid loc from func decl.
nate-chandler Jun 17, 2023
2bfa723
[MoveOnlyAddressChecker] Added extension flag.
nate-chandler Jun 17, 2023
504b76a
[Macros] Add test using observer accessors (didSet/willSet) with Obse…
DougGregor Jun 17, 2023
cbd0b15
Merge pull request #66712 from felipepiovezan/felipe/update_debug_inf…
felipepiovezan Jun 17, 2023
c2f164d
Merge pull request #66692 from adrian-prantl/110841130
adrian-prantl Jun 17, 2023
606eef6
Merge pull request #66719 from nkcsgexi/clean-up-framework
nkcsgexi Jun 17, 2023
91ee824
Merge pull request #66690 from nate-chandler/rdar110676577
nate-chandler Jun 17, 2023
d312589
Merge pull request #66585 from nate-chandler/rdar99681073
nate-chandler Jun 17, 2023
66867c0
[MoveOnlyAddressChecker] Fix used fields repr.
nate-chandler Jun 17, 2023
6fecae9
[FieldSensitivePL] Silenced warning.
nate-chandler Jun 18, 2023
bbed05b
Merge pull request #66728 from nate-chandler/rdar110676577_2
swift-ci Jun 18, 2023
de45ab1
Merge pull request #66739 from nate-chandler/gardening/20230617/1/fix…
nate-chandler Jun 18, 2023
2a78957
Merge pull request #66072 from apple/platform-ccc
rauhul Jun 19, 2023
8d84a64
[wasm] Add metadata registration for WebAssembly
kateinoigakukun Jun 11, 2023
5528b40
Merge pull request #66534 from kateinoigakukun/pr-a7645923603fc716c8f…
kateinoigakukun Jun 19, 2023
199616a
Merge pull request #66708 from xedin/generalize-default-closure-type-…
xedin Jun 19, 2023
f527f72
Merge pull request #66423 from kateinoigakukun/pr-0c7c2f57b05a694965a…
kateinoigakukun Jun 19, 2023
8caf999
Merge pull request #66718 from hamishknight/getting-out-of-a-bind
hamishknight Jun 19, 2023
86f2ced
StackProtection: treat source-operands of `memcpy` and `memmove` intr…
eeckstein Jun 16, 2023
41f46ec
[Threading][TSan] Fix TSan errors from lazy init on Linux.
al45tair Jun 16, 2023
ee5efff
[Threading][TSan] Update after review comments.
al45tair Jun 19, 2023
8ed8a28
[Threading][TSan] Move ThreadSanitizer.cpp into the main runtime.
al45tair Jun 19, 2023
4a1afa9
[cxx-interop] Avoid crashing when template substitution fails
egorzhdan Jun 19, 2023
189dfc8
Merge pull request #66545 from kateinoigakukun/pr-24ab097e23a1794d0cb…
kateinoigakukun Jun 19, 2023
bad716f
[Threading][TSan] Rearrange things again.
al45tair Jun 19, 2023
3f0018d
[Threading][TSan] Fix linkage issue.
al45tair Jun 19, 2023
6cd4b7c
[cxx-interop] Make `std::string::append` usable from Swift
egorzhdan Jun 19, 2023
a70b040
Merge pull request #66746 from eeckstein/stack-protection
eeckstein Jun 19, 2023
1544c39
Added missing documentation to TaskLocal
dimitribouniol Jun 19, 2023
a8c45c5
Fix MoveOnlyAddressChecker to handle value deinits.
atrick Jun 16, 2023
18b359f
[Threading][TSan] Fix builds where TSan isn't supported.
al45tair Jun 20, 2023
3a0802b
GettingStarted.md: add missing link for Ubuntu 18.04 dependencies
MaxDesiatov Jun 20, 2023
f61249d
GettingStarted.md: fix incorrect list item index
MaxDesiatov Jun 20, 2023
ae0a061
Merge pull request #66543 from kateinoigakukun/pr-b1e7535cbac5af8c5e0…
kateinoigakukun Jun 20, 2023
262e238
Merge pull request #66760 from apple/maxd/ubuntu-18.04
swift-ci Jun 20, 2023
390f5c3
[CS] Avoid crashing if we have no contextual type for initialization
hamishknight Jun 19, 2023
9474b9d
Optimizer: add simplifications for checked_cast_br and unchecked_ref_…
eeckstein Jun 20, 2023
4ce4527
[cxx-interop] Make CxxShim header and modulemap arch-independent
egorzhdan Jun 20, 2023
b79b65c
[cxx-interop] Allow inserting elements into `std::set` from Swift
egorzhdan Jun 20, 2023
553ad39
Merge pull request #66762 from hamishknight/out-of-context
hamishknight Jun 20, 2023
c7d6821
Merge pull request #66726 from jckarter/disallow-dynamic-move-only-de…
jckarter Jun 20, 2023
9b886e5
Merge pull request #66714 from oxy/benchmark-minver
oxy Jun 20, 2023
90faaee
Merge pull request #66753 from apple/egorzhdan/std-string-append
egorzhdan Jun 20, 2023
b63a106
Merge pull request #66640 from JTurcotti/protocol-variance
Jun 20, 2023
5cf10f2
[test] Make KeyPath test pointer-size agnostic
kateinoigakukun Jun 20, 2023
c3a4ba0
[wasm][stdlib] Stop including stdint.h in wasi-libc for SwiftShims
kateinoigakukun Jun 20, 2023
fff1c5d
Merge pull request #66685 from meg-gupta/interiorpointerupdate
meg-gupta Jun 20, 2023
31e4465
[DebugInfo] Merge fragments from SIL with fragments created in IRGen …
asavonic Jun 20, 2023
ceb32c0
SIL: hop_to_executor can release
eeckstein Jun 20, 2023
ea5edcb
ARCCodeMotion: support bisecting individual optimized retain-instruct…
eeckstein Jun 20, 2023
1790ca2
Merge pull request #66691 from atrick/fix-field-liveness
atrick Jun 20, 2023
ed2cbca
ClosureLifetimeFixup: Remove copy of borrowed move-only nonescaping c…
jckarter Jun 14, 2023
0b6db0a
Fix test/AutoDiff directory
aschwaighofer May 25, 2023
2c00862
Fix ClangImporter directory
aschwaighofer May 25, 2023
8204f08
Fix test/Concurrency/Backdeploy directory
aschwaighofer May 25, 2023
dd28827
Merge pull request #66772 from kateinoigakukun/pr-03818d471708d1b8e89…
swift-ci Jun 20, 2023
39da8be
Fix test/Distributed directory
aschwaighofer May 26, 2023
99b5f1b
Fix directory test/ModuleInterface
aschwaighofer May 26, 2023
92499e1
Fix directory test/Serialization
aschwaighofer May 26, 2023
679a4d8
Add fixes test/SILOptimizer test
aschwaighofer May 30, 2023
f9abb02
Merge pull request #66763 from eeckstein/existential-ref-cast-opt
eeckstein Jun 20, 2023
b4092c4
[move-only] Remove use after move in CopiedLoadBorrowEliminationVisitor.
gottesmm Jun 20, 2023
07a35e9
[CAS] Workaround the missing file system dependency from clang importer
cachemeifyoucan Jun 6, 2023
35e6915
[Serialization] Avoid file buffer lookup if not needed
cachemeifyoucan May 24, 2023
b8e2f37
[NFC] Simplify Supplementary Outputs enumeration
cachemeifyoucan Jun 16, 2023
df09a26
Merge pull request #66754 from dimitribouniol/patch-1
ktoso Jun 20, 2023
a22b71f
Merge pull request #66722 from rintaro/macros-pluginloader-table
rintaro Jun 20, 2023
ac6ec58
[Test] Marked execution test requires execution.
nate-chandler Jun 21, 2023
effa462
Merge pull request #66771 from kateinoigakukun/pr-a74145962ac2dafc8e5…
kateinoigakukun Jun 21, 2023
29b2737
[static-stdlib] NFC: Generalize the static-executable-args.lnk file g…
kateinoigakukun Jun 9, 2023
8f30a00
MoveOnlyChecker: Look through `convert_function` of nonescaping closu…
jckarter Jun 21, 2023
0845bc1
Merge pull request #66789 from nate-chandler/rdar111066023
swift-ci Jun 21, 2023
0795ded
Merge pull request #66759 from kateinoigakukun/pr-a33fc5da8cdbc494e39…
swift-ci Jun 21, 2023
2555dc7
[static-stdlib] Add static executable support for WASI target
kateinoigakukun Jun 9, 2023
493a25f
[IRGen+Runtime] Add layout string support for generic single payload …
drexin Jun 21, 2023
76a8f0c
Remove old hack in transitive address use walker for store_borrow
meg-gupta Jun 8, 2023
031255c
Rename hasPointerEscape -> findPointerEscape
meg-gupta May 23, 2023
4862ecc
Consolidate swift::findPointerEscape(SILValue) and swift::findPointer…
meg-gupta May 23, 2023
e1e933c
[ConstraintLocator] NFC: Add a way to check whether builder is pointi…
xedin Jun 21, 2023
5e30445
[CSSimplify] Add special handling if specialized type comes from `Typ…
xedin Jun 21, 2023
1dcdb6e
Merge pull request #66776 from eeckstein/retain-sinking-bisecting
eeckstein Jun 21, 2023
ca0061d
Merge pull request #66773 from eeckstein/fix-hop-to-executor
eeckstein Jun 21, 2023
6d3b4e0
Handle borrow uses and interior pointer uses in swift::findPointerEscape
meg-gupta May 23, 2023
0b9782a
GenericSpecializer: fix a crash when specializing a method with dynam…
eeckstein Jun 21, 2023
28df294
Remove spacing
kimdv Jun 21, 2023
c9d20c4
Merge pull request #66793 from kateinoigakukun/pr-a75d757a3dcce5b9904…
kateinoigakukun Jun 21, 2023
26832c8
SILCombine: correctly set the `[stack]` flag when replacing `alloc_re…
eeckstein Jun 21, 2023
0b09af1
[Backtracing] Fix crash in CrashAsync test on Ubuntu 18.04.
al45tair Jun 21, 2023
bfb5d21
PerformanceDiagnostics: fix two small issues which result in false al…
eeckstein Jun 21, 2023
84a2f33
Merge pull request #66749 from apple/egorzhdan/cxx-template-subst-crash
egorzhdan Jun 21, 2023
fbf15ae
Merge pull request #66765 from apple/egorzhdan/arch-independent-cxxshim
egorzhdan Jun 21, 2023
21f4cc1
Merge pull request #66799 from kimdv/kimdv/1815-anytype-in-header-alw…
kimdv Jun 21, 2023
00d681b
Merge pull request #66780 from aschwaighofer/fix_some_opaque_ptr_test…
aschwaighofer Jun 21, 2023
ee9727b
The test IRGen/protocol_metadata.swift does not support arm64e
aschwaighofer Jun 21, 2023
46db1a0
Merge pull request #66801 from al45tair/eng/PR-110846253
al45tair Jun 21, 2023
b77a8d9
Merge pull request #66798 from eeckstein/fix-generic-specializer
eeckstein Jun 21, 2023
58d41a1
Merge pull request #66803 from eeckstein/fix-performance-diagnostics
eeckstein Jun 21, 2023
5cb1d4d
Fix test/IRGen/class_resilience_objc_armv7k.swift for opaque pointers
aschwaighofer Jun 21, 2023
7eb8283
[Runtime] Let CF provide us with state, avoiding runtime lookup. rdar…
Catfish-Man Jun 21, 2023
77ba6f5
Merge pull request #66782 from aschwaighofer/fix_some_opaque_ptr_test…
aschwaighofer Jun 21, 2023
b02e305
Merge pull request #66808 from aschwaighofer/fix_protocol_metadata_te…
swift-ci Jun 21, 2023
26d8d84
Merge pull request #66651 from jckarter/noncopyable-address-only-borr…
jckarter Jun 21, 2023
282a9a7
Merge pull request #66792 from jckarter/nonescaping-closure-conversio…
jckarter Jun 21, 2023
7aa4a8d
Revert "Merge pull request #66793 from kateinoigakukun/pr-a75d757a3dc…
MaxDesiatov Jun 21, 2023
bcc102d
Revert "Merge pull request #66759 from kateinoigakukun/pr-a33fc5da8cd…
MaxDesiatov Jun 21, 2023
3b5ebaa
Fix some tests in IRGen folder
aschwaighofer May 31, 2023
599e82c
Fix more test/IRGen test cases
aschwaighofer Jun 2, 2023
1d3ee23
Use swift::once instead of swift_once to clean up the code a little, …
Catfish-Man Jun 21, 2023
f509a29
Merge pull request #66575 from cachemeifyoucan/eng/PR-caching-tune-up
cachemeifyoucan Jun 21, 2023
b4b12ad
Merge pull request #66800 from eeckstein/fix-allocref-combine
eeckstein Jun 21, 2023
53d308a
Add an explicit barrier, mostly for clarity
Catfish-Man Jun 21, 2023
c84a14f
IRGen: Conditional conformances for variadic types
slavapestov Apr 3, 2023
d1cb930
Runtime: Support for conditional conformances with pack conformance r…
slavapestov Mar 28, 2023
3052e36
Runtime: Fix dynamic casts of variadic types that conditionally conform
slavapestov Jun 21, 2023
b8a4132
Merge pull request #66783 from gottesmm/pr-9c93f4322f46013f6053b162d3…
gottesmm Jun 21, 2023
bb394a0
Use proper atomics instead of trying to do it with explicit barriers
Catfish-Man Jun 21, 2023
300f3fd
Better memory order
Catfish-Man Jun 21, 2023
60d82c7
Merge pull request #66810 from aschwaighofer/fix_class_resilience_obj…
swift-ci Jun 21, 2023
79332c1
emit error when a noncopyable enum has a raw type
kavon Jun 21, 2023
d3249ac
sourcekitd: adjust the definition of `SOURCEKIT_PUBLIC`
compnerd Jun 21, 2023
8742b1a
Runtime: Fix shape requirement handling in _checkGenericRequirements()
slavapestov Jun 21, 2023
b08eb62
Rename SinkAddressProjections::projections -> SinkAddressProjections:…
meg-gupta May 31, 2023
56629e1
Verify we don't have any address phis
meg-gupta May 31, 2023
37d8586
Update SILSSAUpdater::areIdentical to check for SILArgument
meg-gupta Jun 21, 2023
46bed7c
Add SinkAddressProjections::newProjections
meg-gupta Jun 21, 2023
44879be
Merge pull request #66811 from apple/maxd/revert-static-executable-lnk
gottesmm Jun 21, 2023
a44b36c
Fix abitypes.swift, class_update_callback_without_fixed_layout.sil,dy…
aschwaighofer Jun 21, 2023
03b8c49
Merge pull request #66645 from meg-gupta/mixinremovesmall
meg-gupta Jun 21, 2023
52961c9
Try to fix windows/linux
aschwaighofer Jun 21, 2023
814e520
[Observable] Test macro through the plugin server
DougGregor Jun 21, 2023
7c3917c
Merge pull request #66818 from kavon/noncopyable-and-raw-error
swift-ci Jun 21, 2023
3676379
Merge pull request #66814 from slavapestov/variadic-type-conditional-…
slavapestov Jun 21, 2023
e306c11
[Macros] Ensure that we visit *all* members when emitting memberwise …
DougGregor Jun 21, 2023
d0938a9
[move-only] Ban resilient noncopyable types.
gottesmm Jun 21, 2023
e33ddaa
[Distributed] Don't diagnose declared dist member properties when imp…
ktoso Jun 22, 2023
53e4e19
build: add a workaround for ARM64 Windows
compnerd Jun 21, 2023
fd369cd
[Runtime] Refactor layout string code (#66831)
drexin Jun 22, 2023
dda0f50
Switch types for keypath diagnostics where
Jun 22, 2023
28df449
Merge pull request #66723 from meg-gupta/improvefindpointerescape
meg-gupta Jun 22, 2023
35a64cb
Merge pull request #66827 from DougGregor/observable-test-via-plugin-…
DougGregor Jun 22, 2023
d3ce401
Merge pull request #66837 from DougGregor/macro-visit-all-members
DougGregor Jun 22, 2023
3ef125b
Merge pull request #66841 from ktoso/wip-distributed-non-file-checkin…
swift-ci Jun 22, 2023
80bb497
Merge pull request #66833 from gottesmm/pr-e19b18739384c4a73467c39d70…
gottesmm Jun 22, 2023
9b6e27e
Merge pull request #66813 from Catfish-Man/bridge-flip-followup
swift-ci Jun 22, 2023
bd753d1
standardize BasicBlockWorkqueue
kavon Jun 22, 2023
51eaf4a
rewrite `findNonisolatedBlame` to use BasicBlockWorkqueue
kavon Jun 22, 2023
ba885d9
rewrite `emitMissingConsumeInDiscardingContext` to use BasicBlockWork…
kavon Jun 22, 2023
057b1e5
change a BFS traversal in PullbackCloner to use BasicBlockWorkqueue
kavon Jun 22, 2023
b395c72
Merge pull request #41690 from apple/maxd/dso-got-plt
MaxDesiatov Jun 22, 2023
059bbf5
[test][Backtracing] Fix crash message pattern for single threaded mode
kateinoigakukun Jun 21, 2023
1a36aab
Merge pull request #66822 from compnerd/atomicity
compnerd Jun 22, 2023
15f7a28
Merge pull request #66820 from compnerd/exported
compnerd Jun 22, 2023
4500aad
[DebugInfo][NFC] Update test to not check width of alloca integer arg…
felipepiovezan Jun 22, 2023
0f20144
Merge pull request #66846 from kavon/standardize-workqueue
swift-ci Jun 22, 2023
f38b9a9
[Threading][TSan] Update comments.
al45tair Jun 22, 2023
3f0c0f0
[Compile Time Constant Extraction] Add extraction of all conformances…
artemcm Jun 14, 2023
e064d23
Merge pull request #66764 from apple/egorzhdan/cxx-set-insert
egorzhdan Jun 22, 2023
e6d282f
[IRGen] Fix symbol generation for getEnumTag function for layout stri…
drexin Jun 22, 2023
c5018f3
[Observation] Ensure lock storage rounding works for non-integral loc…
phausler Jun 22, 2023
e20be0e
Revert [Runtime] Let CF provide us with state, avoiding runtime looku…
Catfish-Man Jun 22, 2023
3202021
Merge pull request #66857 from Catfish-Man/revert-bridge-flip
gottesmm Jun 22, 2023
806fd1b
[Runtime] Handle generic single payload enums in resilient resolve (#…
drexin Jun 22, 2023
1e89ad6
Sink address projections in ArrayPropertyOpt so that there are no add…
meg-gupta Jun 21, 2023
024efd2
SILGen: Don't emit key path property descriptors for properties in or…
jckarter Jun 22, 2023
4fc0be2
Merge pull request #66853 from felipepiovezan/felipe/alloca_size_int_…
felipepiovezan Jun 22, 2023
640a006
[DebugInfo][NFC] Update test to not check width of integer argument
felipepiovezan Jun 22, 2023
bbccbd3
Merge pull request #66179 from Mayank-84/Refactor/Stacks
swift-ci Jun 22, 2023
c3ae413
[Runtime] Use proper offset in generic multi payload enum layout stri…
drexin Jun 22, 2023
37220ed
[Runtime] Handle generic multi payload enums in resilient resolve (#6…
drexin Jun 22, 2023
4f4d014
Merge pull request #66721 from al45tair/eng/PR-110665213
al45tair Jun 22, 2023
7964918
[cxx-interop] Fix sema lookup scope so we find NSNotification interfa…
zoecarver May 31, 2023
7216be1
[cxx-interop] A little macros fix; breadcrumbs for future fixes.
zoecarver May 31, 2023
7d47cb9
[cxx-interop] fix how we import CF types.
zoecarver May 31, 2023
b66dfad
[SourceKit] When AST-based cursor info is cancelled, don’t run solver…
ahoppen Jun 22, 2023
35661f2
[SourceKit] Inform consumers about cancellation from a background queue
ahoppen Jun 22, 2023
1980da9
Merge pull request #66812 from aschwaighofer/fix_some_opaque_ptr_test…
aschwaighofer Jun 22, 2023
957b465
Fix some IRGen tests on armv7k for opaque pointers
aschwaighofer Jun 22, 2023
5eee766
Fix test/IRGen/abitypes.swift
aschwaighofer Jun 22, 2023
49831a9
Fix @objcImpl crash with async/sync overloads
beccadax Jun 22, 2023
096d8ea
[CodeCompletion] Suggest synthesized declarations from macros
rintaro Jun 21, 2023
3e28a7c
[cxx-interop] Make libstdc++ header and modulemap arch-independent
egorzhdan Jun 22, 2023
d9d26ee
Add support for classes in _createOffsetBasedKeyPath
Azoy Jun 22, 2023
037ddc9
[CursorInfo] Re-use already built ASTs ahead of currently building ones
bnbarham Jun 22, 2023
a92deb0
[GenericSignature] Exclude GenericParam Constraints
angela-laar Jun 21, 2023
9da65ca
Merge pull request #66865 from aschwaighofer/fix_opaque_pointer_irgen…
swift-ci Jun 22, 2023
a0fa946
[Completion] Add targetEnvironment(macCatalyst) platform condition
bnbarham Jun 22, 2023
31952cc
Merge pull request #66860 from jckarter/no-moveonly-property-descriptors
jckarter Jun 23, 2023
8d4a51b
Merge pull request #66858 from beccadax/names-out-of-sync
beccadax Jun 23, 2023
36ddb77
[IRGen+Runtime] Layout string getEnumTag for generic multi payload en…
drexin Jun 23, 2023
edc003a
Merge pull request #66850 from kateinoigakukun/katei/patch-series/rep…
kateinoigakukun Jun 23, 2023
536234b
Merge pull request #66859 from felipepiovezan/felipe/alloca_size_int_…
felipepiovezan Jun 23, 2023
12f01ce
Merge pull request #66855 from apple/egorzhdan/libstdcxx-arch-indepen…
egorzhdan Jun 23, 2023
dc60c07
[DebugInfo] Disable failing tests on watchOS
felipepiovezan Jun 23, 2023
511c344
[Build] Introduce --lldb-configure-tests option
Michael137 Jun 23, 2023
d72cc2c
Merge pull request #66879 from felipepiovezan/felipe/disable_watchos_…
swift-ci Jun 23, 2023
b91328c
Merge pull request #66866 from ahoppen/ahoppen/cursor-info-deadlock
ahoppen Jun 23, 2023
453f6cd
[SoruceKit] Audit SwiftASTManager to prevent deadlocks
ahoppen May 19, 2022
9a11e04
Merge pull request #66639 from artemcm/ConstExtractConformanceInfo
artemcm Jun 23, 2023
1d7c534
Merge pull request #66839 from bnbarham/reuse-cursor-ast
bnbarham Jun 23, 2023
3ea3234
Merge pull request #66875 from bnbarham/add-maccatalyst-completion
bnbarham Jun 23, 2023
e5ece81
[Freestanding] Remove uses of stat() and dlsym().
al45tair Jun 23, 2023
ce4ec06
Merge pull request #66796 from xedin/rdar-111059036
xedin Jun 23, 2023
196ea79
Merge pull request #66821 from rintaro/completion-macro-expanded-rdar…
rintaro Jun 23, 2023
6607f05
Merge pull request #66864 from angela-laar/exclude-generic-param-cons…
angela-laar Jun 23, 2023
e9ff334
Fix missing indexing data with overloaded type (#65729)
keith Jun 23, 2023
821e260
Merge pull request #66880 from Michael137/bugfix/build-script-configu…
JDevlieghere Jun 23, 2023
92fd8da
[FieldSensitivePL] Fixed use-before-def handling.
nate-chandler Jun 20, 2023
7c1e5ec
[SIL] NFC: Added debug printing of block ids.
nate-chandler Jun 23, 2023
7322ccb
[FieldSensitivePL] NFC: Added unit tests.
nate-chandler Jun 19, 2023
9606a9a
[ASTPrinter] Stop unnecessary escaping of `init` in macro role attrib…
DougGregor Jun 23, 2023
e89fdd3
Requestify the computation of the list of memberwise initialized prop…
DougGregor Jun 22, 2023
a1464cf
Correctly remove properties subsumed by init accessors from memberwis…
DougGregor Jun 22, 2023
7ed59e1
Reimplement InitAccessorPropertiesRequest on top of MemberwiseInitPro…
DougGregor Jun 22, 2023
2114833
[nfc] Fix notification test
zoecarver Jun 8, 2023
6da1df2
Merge pull request #66825 from meg-gupta/addressphilast
meg-gupta Jun 23, 2023
31e0252
Make sure we query `hasInitAccessor` before looking for the init acce…
DougGregor Jun 23, 2023
4b1a1e7
Merge pull request #66889 from DougGregor/init-accessor-stop-escaping…
DougGregor Jun 23, 2023
8eff2e8
[LifetimeExtension] Handle use-before-def.
nate-chandler Jun 23, 2023
ff7aa3c
[LifetimeExtension] Fixed reinit collection.
nate-chandler Jun 23, 2023
d6486e2
Add test
Jun 23, 2023
e197c00
Merge pull request #66883 from al45tair/eng/PR-111214571
al45tair Jun 23, 2023
606db01
Merge pull request #66730 from DougGregor/observable-willset-didset
DougGregor Jun 23, 2023
995c41c
Merge pull request #66826 from nate-chandler/rdar110862719
swift-ci Jun 23, 2023
3ddab3e
Merge pull request #66897 from zoecarver/fix-scope-when-lookup
zoecarver Jun 23, 2023
a44c77d
Merge pull request #66867 from DougGregor/requestify-member-init-prop…
DougGregor Jun 24, 2023
2227930
[ConstraintSystem] Adjust the way pack parameters are opened
xedin Jun 24, 2023
270089f
[IRGen+Runtime] Layout string getEnumTag for fixed size enums subset …
drexin Jun 24, 2023
0a2defe
[Concurrency] Fix code snippet on task group docs
ktoso Jun 24, 2023
98d895d
Merge pull request #66892 from nate-chandler/rdar111221183
nate-chandler Jun 24, 2023
ab95dba
[CursorInfo] Pass primary path to allow comparing previous ASTs
bnbarham Jun 23, 2023
253d8fb
[IRGen+Runtime] Add getEnumTag for layout strings on generic single p…
drexin Jun 24, 2023
da34a4e
Merge pull request #66912 from apple/ktoso-patch-15
ktoso Jun 24, 2023
22d34d9
Merge pull request #58978 from ahoppen/pr/no-deadlock-cancellation-bi…
ahoppen Jun 26, 2023
3122440
Merge pull request #66766 from amritpan/key-path-backward-diag
xedin Jun 26, 2023
b1b1698
Merge pull request #66910 from xedin/issue-66095
xedin Jun 26, 2023
93ec785
Merge pull request #66907 from bnbarham/fix-reuse-test
bnbarham Jun 26, 2023
0bb142f
Merge pull request #66870 from Azoy/keypath-offset-spi-fix
Azoy Jun 26, 2023
73f39af
Merge remote-tracking branch 'origin/main' into felipe/fix_merge_opaque
felipepiovezan Jun 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,11 @@ option(SWIFT_THREADING_PACKAGE
Valid package names are 'pthreads', 'darwin', 'linux', 'win32', 'c11', 'none'
or the empty string for the SDK default.")

option(SWIFT_THREADING_HAS_DLSYM
"Enable the use of the dlsym() function. This gets used to provide TSan
support on some platforms."
TRUE)

option(SWIFT_ENABLE_MACCATALYST
"Build the Standard Library and overlays with MacCatalyst support"
FALSE)
Expand Down Expand Up @@ -1043,6 +1048,14 @@ elseif("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "ANDROID")
set(SWIFT_PRIMARY_VARIANT_SDK_default "${SWIFT_HOST_VARIANT_SDK}")
set(SWIFT_PRIMARY_VARIANT_ARCH_default "${SWIFT_HOST_VARIANT_ARCH}")

elseif("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "WASI")
set(SWIFT_HOST_VARIANT "wasi" CACHE STRING
"Deployment OS for Swift host tools (the compiler) [wasi]")

configure_sdk_unix("WASI" "wasm32")
set(SWIFT_PRIMARY_VARIANT_SDK_default "${SWIFT_HOST_VARIANT_SDK}")
set(SWIFT_PRIMARY_VARIANT_ARCH_default "${SWIFT_HOST_VARIANT_ARCH}")

elseif("${SWIFT_HOST_VARIANT_SDK}" MATCHES "(OSX|IOS*|TVOS*|WATCHOS*)")

set(SWIFT_HOST_VARIANT "macosx" CACHE STRING
Expand Down
20 changes: 10 additions & 10 deletions SwiftCompilerSources/Sources/Optimizer/DataStructures/Stack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ struct Stack<Element> : CollectionLikeSequence {

mutating func next() -> Element? {
let end = (slab.data == lastSlab.data ? endIndex : slabCapacity)
if index < end {
let elem = Stack.bind(slab)[index]
index += 1

if index >= end && slab.data != lastSlab.data {
slab = slab.getNext()
index = 0
}
return elem

guard index < end else { return nil }

let elem = Stack.bind(slab)[index]
index += 1

if index >= end && slab.data != lastSlab.data {
slab = slab.getNext()
index = 0
}
return nil
return elem
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ swift_compiler_sources(Optimizer
SimplifyInitEnumDataAddr.swift
SimplifyLoad.swift
SimplifyPartialApply.swift
SimplifyRefCasts.swift
SimplifyRetainReleaseValue.swift
SimplifyStrongRetainRelease.swift
SimplifyStructExtract.swift
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
//===--- SimplifyRefCasts.swift -------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

import SIL

// Note: this simplifications are not SILCombineSimplifyable, because SILCombine has
// its own simplifications for those cast instructions which are not ported to Swift, yet.

extension CheckedCastBranchInst : OnoneSimplifyable {
func simplify(_ context: SimplifyContext) {
// Has only an effect if the source is an (existential) reference.
simplifySourceOperandOfRefCast(context)
}
}

extension UncheckedRefCastInst : OnoneSimplifyable {
func simplify(_ context: SimplifyContext) {
simplifySourceOperandOfRefCast(context)
}
}

private extension UnaryInstruction {

/// Look through `upcast` and `init_existential_ref` instructions and replace the
/// operand of this cast instruction with the original value.
/// For example:
/// ```
/// %2 = upcast %1 : $Derived to $Base
/// %3 = init_existential_ref %2 : $Base : $Base, $AnyObject
/// checked_cast_br %3 : $AnyObject to Derived, bb1, bb2
/// ```
///
/// This makes it more likely that the cast can be constant folded because the source
/// operand's type is more accurate. In the example above, the cast reduces to
/// ```
/// checked_cast_br %1 : $Derived to Derived, bb1, bb2
/// ```
/// which can be trivially folded to always-succeeds.
///
func simplifySourceOperandOfRefCast(_ context: SimplifyContext) {
while true {
switch operand.value {
case let ier as InitExistentialRefInst:
if !tryReplaceSource(withOperandOf: ier, context) {
return
}
case let uc as UpcastInst:
if !tryReplaceSource(withOperandOf: uc, context) {
return
}
default:
return
}
}

}

func tryReplaceSource(withOperandOf inst: SingleValueInstruction, _ context: SimplifyContext) -> Bool {
let singleUse = context.preserveDebugInfo ? inst.uses.singleUse : inst.uses.singleNonDebugUse
let canEraseInst = singleUse?.instruction == self
let replacement = inst.operands[0].value

if parentFunction.hasOwnership {
if !canEraseInst && replacement.ownership == .owned {
// We cannot add more uses to `replacement` without inserting a copy.
return false
}

operand.set(to: replacement, context)

if let ccb = self as? CheckedCastBranchInst {
// In OSSA, the source value is passed as block argument to the failure block.
// We have to re-create the skipped source instruction in the failure block.
insertCompensatingInstructions(for: inst, in: ccb.failureBlock, context)
}
} else {
operand.set(to: replacement, context)
}

if canEraseInst {
context.erase(instructionIncludingDebugUses: inst)
}
return true
}
}

/// Compensate a removed source value instruction in the failure block.
/// For example:
/// ```
/// %inst = upcast %sourceValue : $Derived to $Base
/// checked_cast_br %inst : $Base to Derived, success_block, failure_block
/// ...
/// failure_block(%oldArg : $Base):
/// ```
/// is converted to:
/// ```
/// checked_cast_br %sourceValue : $Derived to Derived, success_block, failure_block
/// ...
/// failure_block(%newArg : $Derived):
/// %3 = upcast %newArg : $Derived to $Base
/// ```
private func insertCompensatingInstructions(for inst: Instruction, in failureBlock: BasicBlock, _ context: SimplifyContext) {
assert(failureBlock.arguments.count == 1)
let sourceValue = inst.operands[0].value
let newArg = failureBlock.addBlockArgument(type: sourceValue.type, ownership: sourceValue.ownership, context)
let builder = Builder(atBeginOf: failureBlock, context)
let newInst: SingleValueInstruction
switch inst {
case let ier as InitExistentialRefInst:
newInst = builder.createInitExistentialRef(instance: newArg, existentialType: ier.type, useConformancesOf: ier)
case let uc as UpcastInst:
newInst = builder.createUpcast(from: newArg, to: uc.type)
default:
fatalError("unhandled instruction")
}
let oldArg = failureBlock.arguments[0]
oldArg.uses.replaceAll(with: newInst, context)
failureBlock.eraseArgument(at: 0, context)
}
Original file line number Diff line number Diff line change
Expand Up @@ -524,10 +524,19 @@ private struct NoStores : ValueDefUseWalker, AddressDefUseWalker {
var walkDownCache = WalkerCache<SmallProjectionPath>()

mutating func leafUse(value: Operand, path: SmallProjectionPath) -> WalkResult {
if let ptai = value.instruction as? PointerToAddressInst {
switch value.instruction {
case let ptai as PointerToAddressInst:
return walkDownUses(ofAddress: ptai, path: path)
case let bi as BuiltinInst:
switch bi.intrinsicID {
case .memcpy, .memmove:
return value.index != 0 ? .continueWalk : .abortWalk
default:
return .abortWalk
}
default:
return .abortWalk
}
return .abortWalk
}

mutating func leafUse(address: Operand, path: SmallProjectionPath) -> WalkResult {
Expand Down
9 changes: 9 additions & 0 deletions SwiftCompilerSources/Sources/SIL/Builder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,13 @@ public struct Builder {
let store = bridged.createStore(source.bridged, destination.bridged, ownership.rawValue)
return notifyNew(store.getAs(StoreInst.self))
}

public func createInitExistentialRef(instance: Value,
existentialType: Type,
useConformancesOf: InitExistentialRefInst) -> InitExistentialRefInst {
let initExistential = bridged.createInitExistentialRef(instance.bridged,
existentialType.bridged,
useConformancesOf.bridged)
return notifyNew(initExistential.getAs(InitExistentialRefInst.self))
}
}
7 changes: 7 additions & 0 deletions SwiftCompilerSources/Sources/SIL/Instruction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@ final public class BuiltinInst : SingleValueInstruction {
return bridged.BuiltinInst_getID()
}

public var intrinsicID: BridgedInstruction.IntrinsicID {
return bridged.BuiltinInst_getIntrinsicID()
}

public var substitutionMap: SubstitutionMap {
SubstitutionMap(bridged.BuiltinInst_getSubstitutionMap())
}
Expand Down Expand Up @@ -1000,6 +1004,9 @@ final public class AwaitAsyncContinuationInst : TermInst, UnaryInstruction {
}

final public class CheckedCastBranchInst : TermInst, UnaryInstruction {
public var source: Value { operand.value }
public var successBlock: BasicBlock { bridged.CheckedCastBranch_getSuccessBlock().block }
public var failureBlock: BasicBlock { bridged.CheckedCastBranch_getFailureBlock().block }
}

final public class CheckedCastAddrBranchInst : TermInst, UnaryInstruction {
Expand Down
8 changes: 4 additions & 4 deletions benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ macro(configure_sdks_darwin)
set(appletvos_arch "arm64")
set(watchos_arch "armv7k" "arm64_32")

set(macosx_ver "10.9")
set(iphoneos_ver "8.0")
set(appletvos_ver "9.1")
set(watchos_ver "2.0")
set(macosx_ver "10.13")
set(iphoneos_ver "11.0")
set(appletvos_ver "11.0")
set(watchos_ver "4.0")

set(macosx_vendor "apple")
set(iphoneos_vendor "apple")
Expand Down
4 changes: 4 additions & 0 deletions cmake/modules/AddSwift.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ function(_add_host_variant_c_compile_flags target)
# (see revision d913eefcc93f8c80d6d1a6de4ea898a2838d8b6f)
# This is required to build with VS2017 15.8+
_ENABLE_EXTENDED_ALIGNED_STORAGE=1>)
if(SWIFT_HOST_VARIANT_ARCH MATCHES "ARM64|aarch64")
target_compile_options(${target} PRIVATE
$<$<COMPILE_LANGUAGE:C,CXX,OBJC,OBJCXX>:-D_STD_ATOMIC_USE_ARM64_LDAR_STLR=0>)
endif()

# msvcprt's std::function requires RTTI, but we do not want RTTI data.
# Emulate /GR-.
Expand Down
12 changes: 10 additions & 2 deletions cmake/modules/AddSwiftUnittests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,24 @@ function(add_swift_unittest test_dirname)
endif()

# some headers switch their inline implementations based on
# SWIFT_STDLIB_SINGLE_THREADED_CONCURRENCY and
# SWIFT_STDLIB_SINGLE_THREADED_CONCURRENCY, SWIFT_STDLIB_HAS_DLSYM and
# SWIFT_THREADING_PACKAGE definitions
if(SWIFT_STDLIB_SINGLE_THREADED_CONCURRENCY)
target_compile_definitions("${test_dirname}" PRIVATE
SWIFT_STDLIB_SINGLE_THREADED_CONCURRENCY)
endif()
if(SWIFT_STDLIB_HAS_DLSYM)
target_compile_definitions("${test_dirname}" PRIVATE
"SWIFT_STDLIB_HAS_DLSYM=1")
else()
target_compile_definitions("${test_dirname}" PRIVATE
"SWIFT_STDLIB_HAS_DLSYM=0")
endif()

string(TOUPPER "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_THREADING_PACKAGE}" _threading_package)
target_compile_definitions("${test_dirname}" PRIVATE
"SWIFT_THREADING_${_threading_package}")
"SWIFT_THREADING_${_threading_package}"
"SWIFT_THREADING_STATIC")

if(NOT SWIFT_COMPILER_IS_MSVC_LIKE)
if(SWIFT_USE_LINKER)
Expand Down
1 change: 1 addition & 0 deletions docs/HowToGuides/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ toolchain as a one-off, there are a couple of differences:
### Linux

1. The latest Linux dependencies are listed in the respective Dockerfiles:
* [Ubuntu 18.04](https://github.com/apple/swift-docker/blob/main/swift-ci/master/ubuntu/18.04/Dockerfile)
* [Ubuntu 20.04](https://github.com/apple/swift-docker/blob/main/swift-ci/master/ubuntu/20.04/Dockerfile)
* [Ubuntu 22.04](https://github.com/apple/swift-docker/blob/main/swift-ci/master/ubuntu/22.04/Dockerfile)
* [CentOS 7](https://github.com/apple/swift-docker/blob/main/swift-ci/master/centos/7/Dockerfile)
Expand Down
24 changes: 24 additions & 0 deletions docs/Lexicon.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ guarantee this. This was
"Do not merge". Placed in PR titles where discussion or analysis is still
ongoing.

## DSO

Dynamic shared object, a shared library file (.so/.dylib/.dll, the extension of
which depends on the platform) to be used by multiple applications while they
are executing.

## dup

From "duplicate". As a noun, refers to another filed issue that describes
Expand Down Expand Up @@ -250,6 +256,18 @@ A representation of all generic parameters and their requirements. Like
types, generic signatures can be [canonicalized](#canonical-type) to be
compared directly.

## GOT

[Global offset table](https://en.wikipedia.org/wiki/Global_Offset_Table),
a section in an executable or a shared library, which enables code to run
independently of the memory address where it is loaded at runtime. Entries
in GOT directly point to absolute addresses of symbols. The format of GOT
is platform-dependent. Loaders update GOT relocations either on
startup or on symbol access.

Additionally, IRGen makes heavy usage of "GOT" as in "GOT-equivalent variable"
to describe the way it forms references to global objects that may or may not be external references.

## iff

["if and only if"](https://en.wikipedia.org/wiki/If_and_only_if). This term comes from mathematics.
Expand Down Expand Up @@ -457,6 +475,12 @@ only to accelerate the process of reading C/C++/Objective-C headers, such as
the bridging headers read in by the `-import-objc-header` command-line
flag to swiftc.

## PLT

Procedure linkage table, which is used to call external functions that don't
have their addresses known at link time. These addresses are then resolved
by a loader at run time.

## PR

1. "Problem Report": An issue reported in [LLVM's bug tracker](https://llvm.org/bugs/).
Expand Down
5 changes: 3 additions & 2 deletions include/swift/ABI/GenericContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,11 @@ class TargetGenericRequirementDescriptor {
return offsetof(typename std::remove_reference<decltype(*this)>::type, Param);
}

/// Retrieve the right-hand type for a SameType or BaseClass requirement.
/// Retrieve the right-hand type for a SameType, BaseClass or SameShape requirement.
llvm::StringRef getMangledTypeName() const {
assert(getKind() == GenericRequirementKind::SameType ||
getKind() == GenericRequirementKind::BaseClass);
getKind() == GenericRequirementKind::BaseClass ||
getKind() == GenericRequirementKind::SameShape);
return swift::Demangle::makeSymbolicMangledNameStringRef(Type.get());
}

Expand Down
Loading