Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3205 commits
Select commit Hold shift + click to select a range
bc0cab9
[test] lit.cfg: Disable swift_interpreter tests when testing remotely
lorentey Aug 23, 2022
5d30b59
Merge pull request #60735 from lorentey/wrangling
swift-ci Aug 23, 2022
30576e5
Merge pull request #60736 from lorentey/wrangling2
swift-ci Aug 24, 2022
6549e0e
AST: Introduce representation for pack conformances
slavapestov Aug 19, 2022
0f26d02
AST: ProtocolConformanceRef can store a pack conformance
slavapestov Aug 19, 2022
ad31fa3
AST: Fix printing of one-element tuples containing a pack expansion
slavapestov Aug 19, 2022
8b9d527
Sema: Don't assume ConformanceChecker::Adoptee is a nominal type
slavapestov Aug 23, 2022
e121dd3
Merge pull request #60672 from tshortli/global-actor-access-control
tshortli Aug 24, 2022
cf337a7
Merge pull request #60731 from rintaro/syntax-unresolved-as-is
DougGregor Aug 24, 2022
40c2678
Sema: Fix existential opening for arguments to self.init/super.init d…
slavapestov Aug 24, 2022
141ffc2
Model isolated parameters in ActorIsolation.
DougGregor Aug 23, 2022
5191c31
Eliminate ImplicitActorHopTarget in favor of ActorIsolation.
DougGregor Aug 24, 2022
210b39d
Merge pull request #60646 from eeckstein/improve-accessutils
eeckstein Aug 24, 2022
046c204
Merge pull request #60726 from slavapestov/variadic-generics-bits
slavapestov Aug 24, 2022
1549ef2
Merge pull request #60722 from apple/egorzhdan/libstdcxx-headers
egorzhdan Aug 24, 2022
943852d
Merge pull request #60686 from Jager-yoo/fix-typo-meantime
etcwilde Aug 24, 2022
fd4e98a
Merge pull request #60634 from glessard/rdar98851696-wMR-error-messages
glessard Aug 24, 2022
3bba7ca
Swift SIL: add `var Function.instructions`
eeckstein Aug 10, 2022
beebd5a
PassManager: add a invalidation kind for non-body function data
eeckstein Aug 11, 2022
306e5b0
Swift SIL: make `Function` hashable
eeckstein Aug 11, 2022
c2ef106
Swift Optimizer: move function passes which are only used for unit te…
eeckstein Aug 23, 2022
5015555
Swift SIL: add a utility protocol `BridgedRandomAccessCollection`
eeckstein Aug 12, 2022
fe40707
Swift SIL: add `Function.isPossiblyUsedExternally` and `Function.isAv…
eeckstein Aug 12, 2022
de6e539
Swift Optimizer: make the set's insert functions return a Bool.
eeckstein Aug 23, 2022
7b9b97f
Swift SIL: fix `BeginAccessInst.endInstructions`
eeckstein Aug 23, 2022
87f2f41
Swift Optimizer: add infrastructure for module passes.
eeckstein Aug 10, 2022
7816513
Swift SIL: add bridging for vTables
eeckstein Aug 11, 2022
fbb694b
Swift SIL: add bridging for witness and default witness tables
eeckstein Aug 12, 2022
90c83be
Swift Optimizer: make the `Stack` data structure also work with a `Mo…
eeckstein Aug 16, 2022
bfb284f
Swift SIL: add a few instructions and `Instruction.visitReferencedFun…
eeckstein Aug 24, 2022
0e59dde
Swift SIL: add the `TermInst.isFunctionExiting` property
eeckstein Aug 24, 2022
2fe1ee5
Swift SIL: add a few `Builder` functions
eeckstein Aug 24, 2022
a12e33e
Swift Optimizer: add the `FunctionUses` utility
eeckstein Aug 24, 2022
1407846
docs: update `SIL-Utilities.md`
eeckstein Aug 24, 2022
8de7939
[interop][SwiftToCxx] add @_expose(Cxx) attribute support
hyp Aug 22, 2022
18a211c
Merge pull request #60734 from tshortli/check-func-param-result-build…
tshortli Aug 24, 2022
a0ef942
IRGen: Use the clang type descriminator for TaskContinuationFunction*
aschwaighofer Aug 24, 2022
730bf24
Add benchmarks that measure KeyPath read and write performance. (#60383)
fibrechannelscsi Aug 24, 2022
0bdef6e
[test] IRGen/opaque_result_alwaysInlineIntoClient: Try again
lorentey Aug 24, 2022
6c2f964
Merge pull request #60748 from aschwaighofer/TaskContinuationFunction…
swift-ci Aug 24, 2022
8556e83
Merge pull request #60178 from amartini51/doc_fixes
amartini51 Aug 24, 2022
1a7146f
Merge pull request #58867 from amartini51/binaryString_93165742
amartini51 Aug 24, 2022
11eee55
Tests: Disable attr_backDeploy_evolution.swift for back_deployment_ru…
tshortli Aug 24, 2022
8f421a7
[SourceKit] Fix a crash because the API for retrieving intherited pro…
ahoppen Aug 24, 2022
afb78b4
[Tests] NFC: Disable remote/device execution of opaque result type cr…
xedin Aug 24, 2022
30d09de
Merge pull request #60715 from hyp/eng/expose-cxx
hyp Aug 24, 2022
70213f0
[SILInliner] Handled null access storage base.
nate-chandler Aug 24, 2022
bd2771e
[CodeComplete] Show global completions from modules that are imported…
ahoppen Aug 24, 2022
e9450cf
[interop][SwiftToCxx] add a test to print out empty Swift stdlib module
hyp Aug 23, 2022
f02a236
Merge pull request #60752 from lorentey/wrangling3
swift-ci Aug 24, 2022
026b05e
Merge pull request #60640 from AnthonyLatsis/migrate-test-suite-to-gh…
AnthonyLatsis Aug 25, 2022
1fdbbbb
Merge pull request #60756 from nate-chandler/rdar99087653
nate-chandler Aug 25, 2022
039b3ef
Merge pull request #60754 from tshortli/disable-attr-backdeploy-evolu…
swift-ci Aug 25, 2022
937d3b9
Merge pull request #60745 from eeckstein/swift-sil-infrastructure
eeckstein Aug 25, 2022
c1e154a
[Gardening] Remove trailing whitespaces in Python scripts. (W291)
YOCKOW Aug 25, 2022
a12490f
[Runtime] Move swiftCompatibilityThreading to toolchain.
al45tair Aug 25, 2022
21b165a
[Threading] Fix comment.
al45tair Aug 25, 2022
a643acd
Merge pull request #60721 from ahoppen/pr/global-results-from-spi-module
ahoppen Aug 25, 2022
47c1fd9
Merge pull request #60751 from ahoppen/pr/rdar99096663
ahoppen Aug 25, 2022
dfecad9
Disable resilient_multipayload_enum.swift test that fails on older ru…
aschwaighofer Aug 25, 2022
7d55dea
Reduce semantic dependencies in contextRequiresStrictConcurrencyCheck…
DougGregor Aug 24, 2022
40bb608
[Profiler] NFC: Add some comments
hamishknight Aug 25, 2022
05e2309
[Profiler] Fix coverage mapping for switches
hamishknight Aug 25, 2022
8f6dadd
Merge pull request #60769 from aschwaighofer/fix_resilient_multipaylo…
swift-ci Aug 25, 2022
1f3600a
[Dependency Scanner] Move the Clang scanning shared state out into lo…
artemcm Aug 25, 2022
543e32f
Merge pull request #60755 from xedin/rdar-99100097
xedin Aug 25, 2022
f04a0c9
IRGen: Only use clang type based task continuation function pointer
aschwaighofer Aug 25, 2022
bdc8aee
Merge pull request #60757 from hyp/eng/expose-stdlib
hyp Aug 25, 2022
8df9fca
[cxx-interop] Don't import constructors of foreign reference types.
zoecarver Aug 25, 2022
baac27d
update test case for windows
WANGJIEKE Aug 23, 2022
5574afc
Merge pull request #60777 from aschwaighofer/fix_fix_task_continuatio…
swift-ci Aug 25, 2022
af7b722
[ConstraintLocator] Introduce `endsWith` convenience function
xedin Aug 25, 2022
bd6aa99
Merge pull request #60775 from hamishknight/switchboard
hamishknight Aug 25, 2022
8e9117d
Handle store_borrow in SILMem2Reg
meg-gupta Jun 9, 2022
847c060
Fix a potential use-after-free in lazy global emission.
rjmccall Aug 25, 2022
1bba62e
Merge pull request #60613 from glessard/pointer-arithmetic-overflow-c…
glessard Aug 25, 2022
c8a3383
Merge pull request #60776 from artemcm/ClangCacheNoPreserve
artemcm Aug 25, 2022
ed7788f
Get rid of isStorageValid flag on lastStoreInst
meg-gupta Aug 25, 2022
b23f1c2
[CSApply] Adjust contextual locator of single expression closure befo…
xedin Aug 25, 2022
932c6b4
[ConstraintSystem] Don't use special locator for value-to-value conve…
xedin Aug 25, 2022
445cbd7
Merge pull request #60778 from zoecarver/dont-import-reference-type-c…
zoecarver Aug 25, 2022
288e4cb
[interop][SwiftToCxx] do not emit functions/methods that use unexpose…
hyp Aug 25, 2022
bd8c874
[interop][SwiftToCxx] experimentally expose Swift::String type to C++
hyp Aug 25, 2022
06d9fd2
[interop][SwiftToCxx] add experimental Swift::String -> NSString conv…
hyp Aug 25, 2022
72190ed
[CSStep] Print disjunctions with bindOverload choices.
Aug 23, 2022
f683c2c
[CSStep] Remove extraneous ) printing after PotentialBindings/Disjunc…
Aug 25, 2022
64b90e8
[interop][SwiftToCxx] docs: add section on converting Swift's String …
hyp Aug 25, 2022
284f8d4
Fix Substring.removeSubrange for entire substring (#60744)
Azoy Aug 25, 2022
013eda4
Merge pull request #60782 from rjmccall/use-after-free-lazy-global-em…
rjmccall Aug 25, 2022
c20bd86
[Freestanding] Disable checked continuations.
nate-chandler Aug 24, 2022
63b2290
Merge pull request #60773 from DougGregor/strict-concurrency-fewer-deps
DougGregor Aug 26, 2022
af9c1bb
Merge pull request #60770 from YOCKOW/W291
CodaFi Aug 26, 2022
cdded2b
Gardening: Migrate test suite to GH issues: decl
AnthonyLatsis Aug 21, 2022
da56654
Gardening: Migrate test suite to GH issues: decl/enum
AnthonyLatsis Aug 21, 2022
0c749b2
Gardening: Migrate test suite to GH issues: decl/ext
AnthonyLatsis Aug 22, 2022
edd4010
Gardening: Migrate test suite to GH issues: decl/func
AnthonyLatsis Aug 23, 2022
6704aab
Gardening: Migrate test suite to GH issues: decl/inherit
AnthonyLatsis Aug 23, 2022
b5e6fb3
Gardening: Migrate test suite to GH issues: decl/nested
AnthonyLatsis Aug 23, 2022
6a91ae3
Gardening: Migrate test suite to GH issues: decl/typealias
AnthonyLatsis Aug 23, 2022
93c964f
Gardening: Migrate test suite to GH issues: decl/subscript
AnthonyLatsis Aug 23, 2022
97e122f
Gardening: Migrate test suite to GH issues: decl/var
AnthonyLatsis Aug 25, 2022
891a44d
Merge pull request #60787 from hyp/eng/string-2-nsstring-docs
hyp Aug 26, 2022
6082d16
Merge pull request #60762 from amritpan/iterate-over-disjunction
xedin Aug 26, 2022
599afbf
Merge pull request #60784 from xedin/rdar-99059525
xedin Aug 26, 2022
dd627b4
Merge pull request #60641 from AnthonyLatsis/migrate-test-suite-to-gh…
AnthonyLatsis Aug 26, 2022
6fe9dd3
Merge pull request #60718 from AnthonyLatsis/migrate-test-suite-to-gh…
AnthonyLatsis Aug 26, 2022
0c35771
[cxx-interop] Emit `-enable-experimental-cxx-interop` flag into the m…
egorzhdan Aug 23, 2022
000df95
Merge pull request #60785 from hyp/eng/string-to-nsstring
hyp Aug 26, 2022
e090bc4
PassManager: cleanup the analysis-invalidation mechanism for swift pa…
eeckstein Aug 26, 2022
2745565
Swift SIL: correctly bridge "invalid" witness table entries.
eeckstein Aug 26, 2022
f6e6b2e
Swift SIL: add the possibility to pass a custom location to `Builder`…
eeckstein Aug 26, 2022
f7aaa35
Swift SIL: fix `KeyPathInst.visitReferencedFunctions`
eeckstein Aug 26, 2022
699eddf
Merge pull request #60764 from al45tair/eng/PR-99125585
al45tair Aug 26, 2022
9a4a21d
Merge pull request #59541 from meg-gupta/mem2regstoreborrowpr
meg-gupta Aug 26, 2022
c8a7e55
[SourceKit] Workaround a bug that parameterized protocols without 'an…
ahoppen Aug 25, 2022
9fcd202
[Dependency Scanning] Do not add underlying Clang moduel to persisten…
artemcm Aug 25, 2022
477461b
[CopyProp] Don't extend lifetime over end_access.
nate-chandler Aug 26, 2022
fea4a94
Merge pull request #60798 from eeckstein/swift-sil-fixes
eeckstein Aug 26, 2022
dd1da22
[CS] Separate availability checking from `SupportedOps` cache
hamishknight Aug 26, 2022
cebcbb0
[CS] Improve diagnostics when `buildPartialBlock` is unavailable
hamishknight Aug 26, 2022
38765fb
[AST] Add a new `@typeWrapper` attribute
xedin Jul 26, 2022
69d80dc
[AST] Add a way to check whether type has a type wrapper
xedin Jul 26, 2022
eb51a11
[AST] Add a way to obtain a type of type wrapper
xedin Aug 1, 2022
029d6d7
[AST] TypeWrappers: Add a way to inject `$Storage` into a type
xedin Jul 26, 2022
ccd7e4f
[AST] TypeWrappers: Add a request to inject or get `$_storage` property
xedin Jul 26, 2022
43feefd
[AST] TypeWrappers: Add a request to create and get "mirror" type wra…
xedin Jul 27, 2022
3dc441b
[TypeChecker] Synthesize getters for stored properties of a type wrap…
xedin Jul 27, 2022
1e0976b
[TypeChecker] Synthesize setters for stored properties of a type wrap…
xedin Jul 28, 2022
0711d77
[Sema] Don't attempt init synthesis for type wrapped types
xedin Jul 28, 2022
d50dec4
[AST] TypeWrapper: Turn `VarDecl::isAccessibleViaTypeWrapper()` into …
xedin Jul 29, 2022
39f5b69
[TypeChecker] Synthesize initializer for a type wrapped declaration
xedin Jul 29, 2022
a672db9
[Sema] TypeWrappers: Make sure that type wrapped properties are alway…
xedin Jul 29, 2022
b3ed4d3
[AST] Make it possible to access type wrapper storage of a var
xedin Jul 29, 2022
d341c41
[AST] Make it possible to access type wrapper property (storage)
xedin Jul 29, 2022
047f51f
[Sema] TypeWrappers: Make sure that synthesized accessors for wrapped…
xedin Jul 29, 2022
7d28a4f
[TypeChecker] NFC: Add more property wrapper tests
xedin Aug 1, 2022
a3b5430
[Frontend] Mark 'Type Wrappers' as experimental feature that has to b…
xedin Aug 1, 2022
39b1566
[Sema] TypeWrappers: convert variable init expr into initializer default
xedin Aug 1, 2022
ecc363d
[Sema] TypeWrappers: Allow wrapping stored properties with attached p…
xedin Aug 10, 2022
20a52d2
[Sema] TypeWrappers/NFC: Move initializer synthesis into a request
xedin Aug 10, 2022
bf2519a
[Sema] Allow implicit parameter decls to have property wrapper attrib…
xedin Aug 11, 2022
0500f35
[Sema] TypeWrappers: Synthesize init parameters for property wrapped …
xedin Aug 12, 2022
8c0f6e1
[TypeWrappers] NFC: Fix type wrapper executable test on Linux
xedin Aug 18, 2022
5a73b48
[Sema] CodeSynthesis: Extract logic to synthesize a parameter for mem…
xedin Aug 24, 2022
347e85d
[Sema] TypeWrappers: Add unamanged stored properties to the synthesiz…
xedin Aug 24, 2022
3aa2bb9
[Sema] TypeWrappers: Mark `$Storage` struct as `internal`
xedin Aug 26, 2022
491defb
[Sema] TypeWrappers: Mark `$_storage` as `private` and all `$Storage`…
xedin Aug 26, 2022
18b2225
Merge pull request #60604 from jckarter/silbuilder-dont-delete-operan…
jckarter Aug 26, 2022
f82a4e7
[ClangImporter] Add the sysroot directly to the clang Driver used to …
finagolfin Aug 26, 2022
0db7246
Merge pull request #60799 from DougGregor/generalize-actor-isolation
DougGregor Aug 26, 2022
308d335
Merge pull request #60789 from artemcm/DepScan-ForgetUnderlyingModule
artemcm Aug 26, 2022
315ee2a
Fix tuple keypath verifier (#60737)
Azoy Aug 26, 2022
b6377ff
Merge pull request #60765 from ahoppen/pr/rdar98623438
ahoppen Aug 26, 2022
cd04e9e
Merge pull request #60792 from nate-chandler/canonicalize_ossa_lifeti…
nate-chandler Aug 26, 2022
641d896
[Distributed] Use distributed thunk witnesses for DA protocol extensi…
DougGregor Aug 26, 2022
f46ed6b
Put @_moveOnly type attribute behind the move only experimental flag.
gottesmm Aug 26, 2022
09c24ef
[Gardening] Remove Unused Parse-Time Circularity Diagnostic
CodaFi Aug 27, 2022
a8b5e14
[NFC] Remove An Unused Vector of Protocols
CodaFi Aug 27, 2022
fde58da
Merge pull request #60809 from DougGregor/distributed-thunk-default-i…
DougGregor Aug 27, 2022
e771660
[build-script] Support building "early" SwiftSyntax via `--early-swif…
DougGregor Aug 27, 2022
aafb6e2
[Build] Add back the reference to the threading library at top level.
al45tair Aug 27, 2022
5ae31c0
Address Python linting failures
DougGregor Aug 27, 2022
055df4a
Merge pull request #60817 from al45tair/eng/PR-99206914
swift-ci Aug 27, 2022
150aca3
Merge pull request #60811 from CodaFi/initial-d
CodaFi Aug 27, 2022
1097375
[Sema] Handle non-function type parameters for closure arguments in a…
LucianoPAlmeida Aug 27, 2022
31d1b3a
Index expressible-by-literal expressions.
allevato Aug 5, 2022
e0f8711
Fix SILMem2Reg while marking end_borrow of store_borrow as deinit point
meg-gupta Aug 28, 2022
98e5025
Merge pull request #60814 from DougGregor/build-early-swiftsyntax
DougGregor Aug 28, 2022
481a561
Merge pull request #60820 from meg-gupta/fixmem2regsbi
swift-ci Aug 28, 2022
47ae4d9
Preliminary Linux-OpenBSD cross-compile support.
3405691582 Aug 27, 2022
c528e96
Add missing REQUIRES: executable_test to the test IRGen/98995607.swif…
aschwaighofer Aug 29, 2022
7bf7642
[interop][SwiftToCxx] support @_expose attribute on initializers
hyp Aug 29, 2022
3740a20
Apply suggestions from code review
3405691582 Aug 29, 2022
2c40a85
Merge pull request #60826 from aschwaighofer/fix_test_IRGen_98995607
swift-ci Aug 29, 2022
925ba6f
Merge pull request #60051 from WANGJIEKE/fix-value-witness-table-type
hyp Aug 29, 2022
9fc19fb
Merge pull request #60827 from hyp/eng/expose-init
hyp Aug 29, 2022
a21984e
Merge pull request #60805 from gottesmm/pr-be37496f2562a6683d2f616f63…
gottesmm Aug 29, 2022
e22fc3e
Merge pull request #60345 from xedin/type-wrappers
xedin Aug 29, 2022
c08428c
[interop][SwiftToCxx] do not support generics with requirements for now
hyp Aug 29, 2022
c14059e
[comment] Add a semantics note to SIL BindMemory
atrick Aug 29, 2022
9ea8683
ABI checker: we should also print ABI breakages when diagnostics are …
nkcsgexi Aug 29, 2022
a89d4f3
[interop][SwiftToCxx] add support for generic methods
hyp Aug 29, 2022
eebebd9
[Dependency Scanning] Do not persist cached Clang module dependencies…
artemcm Aug 29, 2022
ff0e5a9
Merge pull request #60829 from atrick/comment-bindmem
swift-ci Aug 29, 2022
842aa60
[ConstraintSystem] Teach partial application check about implicit con…
xedin Aug 29, 2022
05648c1
Merge pull request #60819 from LucianoPAlmeida/crash-generic-ambiguity
xedin Aug 29, 2022
c838945
Merge pull request #60832 from hyp/eng/generic-requirement-not-yet-no…
hyp Aug 30, 2022
4ee63da
Gardening: Migrate test suite to GH issues: decl/protocol
AnthonyLatsis Aug 26, 2022
095226f
Merge pull request #60834 from nkcsgexi/98624267
nkcsgexi Aug 30, 2022
5170a2e
[Parse] Handle underscored integer in #sourceLocation line directive
LucianoPAlmeida Aug 27, 2022
3b03a5e
AST: Work around shortcoming in abstract conformance representation w…
slavapestov Aug 29, 2022
007fe96
AST: Don't build useless inherited conformances
slavapestov Aug 29, 2022
d7a3355
[Option] Add all new driver arguments (without implementations)
bnbarham Aug 27, 2022
cbc23cb
[Interop][SwiftToCxx] Support enum creation from Cxx
WANGJIEKE Aug 30, 2022
e70fbbc
[ConstraintSystem] correct the @preconcurrency adjustment of var refe…
kavon Aug 12, 2022
6c24bc5
[AST][SILGen] model ABI-safe casts of LValues
kavon Aug 24, 2022
a4d661d
Add tests for rdar://98018067
kavon Aug 19, 2022
7d71d64
Merge pull request #60835 from hyp/eng/generic-methods-gogo
hyp Aug 30, 2022
8ba5188
[ConstraintSystem] Before applying the result builder transform to a
hborla Aug 30, 2022
0a69740
[test] update SwiftToCxx unsigned-return-type-no-zext.cpp test to
hyp Aug 30, 2022
f7a11c7
Tests all cases of `infer-cross-compile-hosts-on-darwin` at once (#60…
edymtt Aug 30, 2022
506cccc
Merge pull request #60837 from xedin/rdar-99282932
xedin Aug 30, 2022
a4bd91a
[SwiftSyntax] Add a human readable name for diagnostics to all nodes
ahoppen Aug 30, 2022
a66951a
Merge pull request #60521 from kavon/preconcurrency-var-access
swift-ci Aug 30, 2022
28a464e
Merge pull request #60845 from hyp/eng/99313326
swift-ci Aug 30, 2022
24dc203
Merge pull request #60813 from bnbarham/add-new-driver-args
bnbarham Aug 30, 2022
b1a939f
Merge pull request #60795 from LucianoPAlmeida/parse-underscore
LucianoPAlmeida Aug 30, 2022
73f2a25
Merge pull request #60761 from AnthonyLatsis/migrate-test-suite-to-gh…
AnthonyLatsis Aug 30, 2022
1b79e2e
Merge pull request #60791 from AnthonyLatsis/migrate-test-suite-to-gh…
AnthonyLatsis Aug 30, 2022
9c84149
Merge pull request #60432 from allevato/index-expressible-by-literal
allevato Aug 30, 2022
ca08b56
Merge pull request #60844 from hborla/generic-result-builder
hborla Aug 30, 2022
609edfb
[Tests] NFC: Limit type wrapper tests to assert builds only (#60846)
xedin Aug 30, 2022
032d50d
Merge pull request #60725 from apple/egorzhdan/cxx-module-interface-flag
egorzhdan Aug 30, 2022
04f1cde
Merge pull request #60830 from artemcm/NoGlobalClangDepCache
artemcm Aug 30, 2022
413fb37
[Print as C++] Don't crash on sugared types
DougGregor Aug 30, 2022
aa05d4a
Move new test where it belongs
DougGregor Aug 30, 2022
17664c0
Fix store_borrow multi block handling in mem2reg
meg-gupta Aug 30, 2022
9bd2d40
[ClangImporter] Update to match new DependencyScanningService API
cachemeifyoucan Aug 30, 2022
64ab6fc
[test] update SwiftToCxx unsigned-return-type-no-zext.cpp test to wor…
hyp Aug 30, 2022
259b2e2
AST: More error-proof getContextSubstitutions()
slavapestov Aug 30, 2022
850797d
[SILGen] correct missing canonicalization of global actor
kavon Aug 30, 2022
d072191
Merge pull request #60855 from cachemeifyoucan/eng/PR-CASDB-cleanup-s…
swift-ci Aug 30, 2022
de94d8d
[TypeChecker] add defensive nullptr checks
kavon Aug 30, 2022
f7b366c
[Sema] TypeWrappers: Don't try to manage compiler synthesized properties
xedin Aug 30, 2022
960906a
[Sema] TypeWrappers: Set `$_storage` access level to `internal`
xedin Aug 30, 2022
c310abd
add -emit-ast and -emit-parse as aliases for the -dump-* flags
kavon Aug 31, 2022
911cfe9
print static struct member as inline and improve test cases
WANGJIEKE Aug 31, 2022
7c452ca
[pruned-liveness] Implement FieldSensitiveAddressPrunedLiveness.
gottesmm Aug 21, 2022
d6b7ec9
Merge pull request #60857 from meg-gupta/fixmem2regsbi2
swift-ci Aug 31, 2022
ff3f736
Merge pull request #60856 from hyp/eng/fix2-unsigned-return-type-no-z…
swift-ci Aug 31, 2022
0bd9280
Merge pull request #60862 from kavon/no-nulls-pls-97339014
swift-ci Aug 31, 2022
bd295d7
Move OwnershipLowering to just before SimplifyCFG
meg-gupta Aug 31, 2022
41884fd
Merge pull request #60866 from kavon/settle-the-dump-vs-emit-debate
swift-ci Aug 31, 2022
9234cd6
Merge pull request #60861 from kavon/overly-sweet-mainactor-96309577
swift-ci Aug 31, 2022
28644db
Merge pull request #60851 from DougGregor/print-cxx-sugared-types
DougGregor Aug 31, 2022
27ff49f
Merge pull request #60804 from buttaface/cross-sysroot
egorzhdan Aug 31, 2022
b6878ce
Link all compatibility libraries when cross compiling and bootstrappi…
edymtt Aug 31, 2022
db2a9a4
Merge pull request #60803 from hamishknight/part-and-partial
hamishknight Aug 31, 2022
1f38c4b
Merge pull request #60790 from nate-chandler/rdar99047747
nate-chandler Aug 31, 2022
971e5e3
Merge pull request #60833 from slavapestov/fix-rdar98404650
slavapestov Aug 31, 2022
8345088
Merge pull request #60738 from slavapestov/open-existential-in-self-s…
slavapestov Aug 31, 2022
1eb294d
Merge pull request #60823 from 3405691582/cross
compnerd Aug 31, 2022
ad25221
[Tests] TypeWrappers: Add test-cases to cover applying type wrapper t…
xedin Aug 30, 2022
325b54d
[Tests] NFC: Disable remote/device execution of type wrapper tests
xedin Aug 31, 2022
44eae31
Merge pull request #60865 from xedin/type-wrappers-make-storage-var-i…
xedin Aug 31, 2022
f54e990
Merge pull request #60847 from ahoppen/ahoppen/node-name-for-diagnostics
ahoppen Aug 31, 2022
15e17b2
Merge pull request #60867 from gottesmm/pr-e5ec659a62bef9590245df9b47…
gottesmm Aug 31, 2022
860cc27
Merge pull request #60870 from meg-gupta/omelower
meg-gupta Aug 31, 2022
8214b85
Merge pull request #60842 from WANGJIEKE/cxx-interop-enum-creation
hyp Aug 31, 2022
d62beac
Merge pull request #60864 from xedin/type-wrappers-on-actors
xedin Aug 31, 2022
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
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ ignore =
# compliant (https://github.com/psf/black#slices).
E203,

# FIXME: We should not have trailing whitespace.
W291,

# Line breaks before binary operators are not explicitly disallowed in
# PEP8, rather it should be consistent throughout the project. The black
# tool puts them on new lines which is to be considered a best practice
Expand Down
13 changes: 7 additions & 6 deletions SwiftCompilerSources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,13 @@ else()
endif()
endif()
if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS AND SWIFT_STDLIB_SUPPORT_BACK_DEPLOYMENT)
set(platform ${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR})
set(compatibility_libs
"swiftCompatibility50-${platform}"
"swiftCompatibility51-${platform}"
"swiftCompatibilityDynamicReplacements-${platform}")

# We cannot specify directly HostCompatibilityLibs
# because ultimately is used to specify a dependency for a
# custom target and, unlike `target_link_libraries`, such dependency
# would be lost at the generation of the build system.
get_property(compatibility_libs
TARGET HostCompatibilityLibs
PROPERTY INTERFACE_LINK_LIBRARIES)
list(APPEND b0_deps ${compatibility_libs})
list(APPEND b1_deps ${compatibility_libs})
endif()
Expand Down
1 change: 1 addition & 0 deletions SwiftCompilerSources/Sources/Optimizer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ add_subdirectory(DataStructures)
add_subdirectory(InstructionPasses)
add_subdirectory(PassManager)
add_subdirectory(FunctionPasses)
add_subdirectory(TestPasses)
add_subdirectory(Utilities)
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ struct BasicBlockRange : CustomStringConvertible, CustomReflectable {

/// Insert a potential end block.
mutating func insert(_ block: BasicBlock) {
if !wasInserted.contains(block) {
wasInserted.insert(block)
if wasInserted.insert(block) {
inserted.append(block)
}
worklist.pushIfNotVisited(block)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ struct BasicBlockWorklist : CustomStringConvertible, CustomReflectable {

/// Pushes \p block onto the worklist if \p block has never been pushed before.
mutating func pushIfNotVisited(_ block: BasicBlock) {
if !pushedBlocks.contains(block) {
pushedBlocks.insert(block);
if pushedBlocks.insert(block) {
worklist.append(block)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
swift_compiler_sources(Optimizer
BasicBlockRange.swift
BasicBlockWorklist.swift
FunctionUses.swift
InstructionRange.swift
Set.swift
Stack.swift)
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
//===--- FunctionUses.swift -----------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 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

/// Provides a list of instructions, which reference a function.
///
/// A function "use" is an instruction in another (or the same) function which
/// references the function. In most cases those are `function_ref` instructions,
/// but can also be e.g. `keypath` instructions.
///
/// 'FunctionUses' performs an analysis of all functions in the module and collects
/// instructions which reference other functions. This utility can be used to do
/// inter-procedural caller-analysis.
///
/// In order to use `FunctionUses`, first call `collect()` and then get use-lists of
/// functions with `getUses(of:)`.
struct FunctionUses {

// Function uses are stored in a single linked list, whereas the "next" is not a pointer
// but an index into `FunctionUses.useStorage`.
fileprivate struct Use {
// The index of the next use in `FunctionUses.useStorage`.
let next: Int?

// The instruction which references the function.
let usingInstruction: Instruction
}

// The head of the single-linked list of function uses.
fileprivate struct FirstUse {
// The head of the use-list.
var first: Int?

// True if the function has unknown uses
var hasUnknownUses: Bool

init(of function: Function) {
self.hasUnknownUses = function.isPossiblyUsedExternally || function.isAvailableExternally
}

mutating func insert(_ inst: Instruction, _ uses: inout [Use]) {
let newFirst = uses.count
uses.append(Use(next: first, usingInstruction: inst))
first = newFirst
}
}

/// The list of uses of a function.
struct UseList : CollectionLikeSequence, CustomStringConvertible {
struct Iterator : IteratorProtocol {
fileprivate let useStorage: [Use]
fileprivate var currentUseIdx: Int?

mutating func next() -> Instruction? {
if let useIdx = currentUseIdx {
let use = useStorage[useIdx]
currentUseIdx = use.next
return use.usingInstruction
}
return nil
}
}

// The "storage" for all function uses.
fileprivate let useStorage: [Use]

// The head of the single-linked use list.
fileprivate let firstUse: FirstUse

/// True if the function has unknown uses in addition to the list of referencing instructions.
///
/// This is the case, e.g. if the function has public linkage or if the function
/// is referenced from a vtable or witness table.
var hasUnknownUses: Bool { firstUse.hasUnknownUses }

func makeIterator() -> Iterator {
return Iterator(useStorage: useStorage, currentUseIdx: firstUse.first)
}

var description: String {
var result = "[\n"
if hasUnknownUses {
result += "<unknown uses>\n"
}
for inst in self {
result += "@\(inst.function.name): \(inst)\n"

}
result += "]"
return result
}

var customMirror: Mirror { Mirror(self, children: []) }
}

// The "storage" for all function uses.
private var useStorage: [Use] = []

// The use-list head for each function.
private var uses: [Function: FirstUse] = [:]

init() {
// Already start with a reasonable big capacity to reduce the number of
// re-allocations when appending to the data structures.
useStorage.reserveCapacity(128)
uses.reserveCapacity(64)
}

/// Returns the use-list of `function`.
///
/// Note that `collect` must be called before `getUses` can be used.
func getUses(of function: Function) -> UseList {
UseList(useStorage: useStorage, firstUse: uses[function, default: FirstUse(of: function)])
}

/// Collects all uses of all function in the module.
mutating func collect(context: ModulePassContext) {

// Mark all functions, which are referenced from tables, to have "unknown" uses.

for vTable in context.vTables {
for entry in vTable.entries {
markUnknown(entry.function)
}
}

for witnessTable in context.witnessTables {
for entry in witnessTable.entries {
if entry.kind == .method, let f = entry.methodFunction {
markUnknown(f)
}
}
}

for witnessTable in context.defaultWitnessTables {
for entry in witnessTable.entries {
if entry.kind == .method, let f = entry.methodFunction {
markUnknown(f)
}
}
}

// Collect all instructions, which reference functions, in the module.
for function in context.functions {
for inst in function.instructions {
inst.visitReferencedFunctions { referencedFunc in
uses[referencedFunc, default: FirstUse(of: referencedFunc)].insert(inst, &useStorage)
}
}
}
}

private mutating func markUnknown(_ function: Function) {
uses[function, default: FirstUse(of: function)].hasUnknownUses = true
}
}
26 changes: 15 additions & 11 deletions SwiftCompilerSources/Sources/Optimizer/DataStructures/Set.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ struct BasicBlockSet : CustomStringConvertible, CustomReflectable {
BasicBlockSet_contains(bridged, block.bridged) != 0
}

mutating func insert(_ block: BasicBlock) {
BasicBlockSet_insert(bridged, block.bridged)
/// Returns true if `block` was not contained in the set before inserting.
@discardableResult
mutating func insert(_ block: BasicBlock) -> Bool {
BasicBlockSet_insert(bridged, block.bridged) != 0
}

mutating func erase(_ block: BasicBlock) {
Expand Down Expand Up @@ -80,8 +82,10 @@ struct ValueSet : CustomStringConvertible, CustomReflectable {
NodeSet_containsValue(bridged, value.bridged) != 0
}

mutating func insert(_ value: Value) {
NodeSet_insertValue(bridged, value.bridged)
/// Returns true if `value` was not contained in the set before inserting.
@discardableResult
mutating func insert(_ value: Value) -> Bool {
NodeSet_insertValue(bridged, value.bridged) != 0
}

mutating func erase(_ value: Value) {
Expand Down Expand Up @@ -139,8 +143,10 @@ struct InstructionSet : CustomStringConvertible, CustomReflectable {
NodeSet_containsInstruction(bridged, inst.bridged) != 0
}

mutating func insert(_ inst: Instruction) {
NodeSet_insertInstruction(bridged, inst.bridged)
/// Returns true if `inst` was not contained in the set before inserting.
@discardableResult
mutating func insert(_ inst: Instruction) -> Bool {
NodeSet_insertInstruction(bridged, inst.bridged) != 0
}

mutating func erase(_ inst: Instruction) {
Expand All @@ -150,11 +156,9 @@ struct InstructionSet : CustomStringConvertible, CustomReflectable {
var description: String {
let function = NodeSet_getFunction(bridged).function
var d = "{\n"
for block in function.blocks {
for inst in block.instructions {
if contains(inst) {
d += inst.description
}
for inst in function.instructions {
if contains(inst) {
d += inst.description
}
}
d += "}\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import SIL
/// destruct this data structure, e.g. in a `defer {}` block.
struct Stack<Element> : CollectionLikeSequence {

private let context: PassContext
private let bridgedContext: BridgedPassContext
private var firstSlab = BridgedSlab(data: nil)
private var lastSlab = BridgedSlab(data: nil)
private var endIndex: Int = 0
Expand Down Expand Up @@ -61,7 +61,8 @@ struct Stack<Element> : CollectionLikeSequence {
}
}

init(_ context: PassContext) { self.context = context }
init(_ context: PassContext) { self.bridgedContext = context._bridged }
init(_ context: ModulePassContext) { self.bridgedContext = context._bridged }

func makeIterator() -> Iterator {
return Iterator(slab: firstSlab, index: 0, lastSlab: lastSlab, endIndex: endIndex)
Expand All @@ -77,11 +78,11 @@ struct Stack<Element> : CollectionLikeSequence {

mutating func push(_ element: Element) {
if endIndex >= Stack.slabCapacity {
lastSlab = PassContext_allocSlab(context._bridged, lastSlab)
lastSlab = PassContext_allocSlab(bridgedContext, lastSlab)
endIndex = 0
} else if firstSlab.data == nil {
assert(endIndex == 0)
firstSlab = PassContext_allocSlab(context._bridged, lastSlab)
firstSlab = PassContext_allocSlab(bridgedContext, lastSlab)
lastSlab = firstSlab
}
(Stack.bind(lastSlab) + endIndex).initialize(to: element)
Expand Down Expand Up @@ -109,12 +110,12 @@ struct Stack<Element> : CollectionLikeSequence {

if endIndex == 0 {
if lastSlab.data == firstSlab.data {
_ = PassContext_freeSlab(context._bridged, lastSlab)
_ = PassContext_freeSlab(bridgedContext, lastSlab)
firstSlab.data = nil
lastSlab.data = nil
endIndex = 0
} else {
lastSlab = PassContext_freeSlab(context._bridged, lastSlab)
lastSlab = PassContext_freeSlab(bridgedContext, lastSlab)
endIndex = Stack.slabCapacity
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ import SIL

let assumeSingleThreadedPass = FunctionPass(
name: "sil-assume-single-threaded", { function, context in
for block in function.blocks {
for inst in block.instructions {
guard let rcInst = inst as? RefCountingInst else { continue }
for inst in function.instructions {
guard let rcInst = inst as? RefCountingInst else { continue }

rcInst.setAtomicity(isAtomic: false, context)
}
rcInst.setAtomicity(isAtomic: false, context)
}
}
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@

swift_compiler_sources(Optimizer
AssumeSingleThreaded.swift
AccessDumper.swift
ComputeEffects.swift
EscapeInfoDumper.swift
ObjCBridgingOptimization.swift
SILPrinter.swift
MergeCondFails.swift
RangeDumper.swift
ReleaseDevirtualizer.swift
RunUnitTests.swift
StackPromotion.swift
)
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ let objCBridgingOptimization = FunctionPass(name: "objc-bridging-opt", {
}

// Now try to optimize non-optional and optional -> non-optional bridging.
for block in function.blocks {
for inst in block.instructions {
if let apply = inst as? ApplyInst {
if !optimizeNonOptionalBridging(apply, context) {
return
}
for inst in function.instructions {
if let apply = inst as? ApplyInst {
if !optimizeNonOptionalBridging(apply, context) {
return
}
}
}
Expand Down
Loading