Skip to content

Manually merge branch 'main' into rebranch #81352

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 81 commits into from
May 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
96ccca6
utils: remove mimalloc workaround
compnerd Apr 7, 2025
e0cfb31
[stdlib] make `_overrideLifetime` functions public
glessard Apr 30, 2025
26764bf
[test] use the stdlib _overrideLifetime functions
glessard Apr 30, 2025
1bf6ac8
compiler-rt: use the current host architecture for the runtime targets
edymtt May 1, 2025
b51cfa5
[cxx-interop] Remove symbolic import mode
egorzhdan May 2, 2025
ddddc66
Merge exported modules with the same public name in generated interface
bnbarham Apr 21, 2025
9482a1b
[gardening] Delete an empty header.
ludwwwig May 3, 2025
17fc00f
[test] IRGen: Adjust FileCheck patterns for new `nuw` attribute in up…
AnthonyLatsis Apr 29, 2025
d57f78e
[test] IRGen: Adjust FileCheck pattern for `nocapture` refactoring in…
AnthonyLatsis Apr 30, 2025
314d524
[test] IRGen: Adjust FileCheck patterns for new `initializes` attribu…
AnthonyLatsis Apr 30, 2025
f512eb1
[test] IRGen: Adjust FileCheck patterns for new `captures` attribute …
AnthonyLatsis Apr 30, 2025
f477ace
[test] IRGen: Adjust FileCheck pattern for new `range` attribute in u…
AnthonyLatsis Apr 30, 2025
76333e2
[test] IRGen: Adjust FileCheck pattern where attribute order changed …
AnthonyLatsis Apr 30, 2025
39aa950
Update file header comments for headers in lib.
ludwwwig May 4, 2025
f04e916
Fix issue with older compilers not handling MutableSpan code
DougGregor May 5, 2025
fd0e551
[Dependency Scanning] Always use a locking diagnostic consumer
artemcm May 2, 2025
c1991d7
[Dependency Scanning][libSwiftScan] Deprecate scanner-global diagnost…
artemcm May 5, 2025
294e4cf
Merge pull request #81257 from swiftlang/egorzhdan/remove-symbolic-mode
egorzhdan May 5, 2025
8c7e855
CMake: add explicit dependency to _Builtin_float to targets...
edymtt May 1, 2025
22efac8
Revert "[Concurrency] adjust abi test for hashable async stream"
DougGregor May 5, 2025
f358c1e
Revert "[Concurrency] Hashable funcs should be inlinable for AsyncStr…
DougGregor May 5, 2025
2e34549
[SE-0470] Prohibit inference of isolated conformances with nonisolate…
DougGregor May 5, 2025
1b5c936
Make ConformanceIsolationRequest cache per-ProtocolConformance
DougGregor May 5, 2025
e4e141f
[Request evaluator] Eliminate assert that fires on cycles
DougGregor May 5, 2025
ba845de
Fix newly introduced warnings in LifetimeDependenceScopeFixup
meg-gupta May 5, 2025
31947d0
RemoteInspection: Fix latent bug in TypeRefIsConcrete::visitOpaqueArc…
slavapestov May 5, 2025
c205c80
RemoteInspection: Remove 'DidSubstitute' form of TypeRef::subst()
slavapestov May 5, 2025
e8a4fcb
CODEOWNERS: Temporarily assign myself to `test/IRGen`
AnthonyLatsis May 5, 2025
df02862
Sema: Disallow SE-0361 with variadic generic types for now
slavapestov May 5, 2025
78adc20
Merge pull request #81242 from edymtt/edymtt/match-host-architecture-…
edymtt May 5, 2025
9d59dbe
[swift-settings] Now that we aren't using it immediately, remove it f…
gottesmm May 5, 2025
0bf1c1f
Merge pull request #80958 from bnbarham/merge-modules
bnbarham May 5, 2025
24fa9c8
ClangImporter: Introduce the #ClangDeclarationImport diagnostic group.
tshortli May 2, 2025
63ee0a4
Merge pull request #81282 from ludwwwig/update-header-comments
xedin May 5, 2025
a08a87b
Merge pull request #81289 from DougGregor/mutablespan-older-compilers
DougGregor May 5, 2025
d7c7713
Merge pull request #81293 from DougGregor/revert-hashable-asyncstream…
DougGregor May 5, 2025
d24aa09
Disable conformance isolation inference for @preconcurrency conformances
DougGregor May 5, 2025
cd4ff86
Merge pull request #81262 from artemcm/DepScanParallelDiagnosticConsumer
artemcm May 5, 2025
a1ea020
Merge pull request #81297 from meg-gupta/fixwarn
meg-gupta May 5, 2025
3323d61
Merge pull request #81258 from tshortli/clang-importer-warning-group
tshortli May 6, 2025
4436e94
[NFC] fix a comment typo in LifetimeDependence
atrick May 5, 2025
170c563
[NFC] cleanup Instruction/Value.findVarDecl() APIs.
atrick May 5, 2025
77a8b39
[NFC] remove FIXMEs from test/SILOptimizer/Inputs/SpanExtras.swift
atrick May 6, 2025
778be22
Merge pull request #81277 from ludwwwig/remove-unused-header
xedin May 6, 2025
7d92dfe
[test] Fix checking C and C++ headers for cross-compilation by explic…
finagolfin May 6, 2025
555bc1b
[xcodegen] Clean up file extension handling
hamishknight May 6, 2025
74e4078
Merge pull request #81290 from atrick/lifedep-comment-typo
atrick May 6, 2025
774d869
Fix some compiler warnings
eeckstein May 6, 2025
67425a5
Swift Optimizer: introduce `InstructionSetWithCount`
eeckstein May 2, 2025
8f39c3c
Swift SIL: rename `isTakeOfSrc` -> `isTakeOfSource` and `isInitializa…
eeckstein May 2, 2025
d2f8c0c
Swift SIL: add some Instruction APIs
eeckstein May 2, 2025
e6b9374
SIL: add `AccessBase.storageIsLexical`
eeckstein May 2, 2025
c6b1e3e
TempRValueElimination: re-implement the pass in swift
eeckstein May 5, 2025
ce0fb99
Merge pull request #81304 from slavapestov/fix-70432
slavapestov May 6, 2025
cc8639b
Merge pull request #81301 from slavapestov/remote-mirrors-cleanups
slavapestov May 6, 2025
69c965e
[Concurrency] Don't pass negative times to the Dispatch code.
al45tair May 6, 2025
d87b776
Merge pull request #81325 from eeckstein/fix-warnings
eeckstein May 6, 2025
5137f6e
Merge pull request #81324 from hamishknight/ext2
hamishknight May 6, 2025
b34e2d7
Merge pull request #81306 from gottesmm/pr-b6ba1a771d90007a5ee6da3e4d…
gottesmm May 6, 2025
08f4d2f
[Concurrency][Tests] Add a test of waiting until a time before the ep…
al45tair May 6, 2025
4b26a3d
[Dependency Scanning] Emit a detailed error diagnostic on Clang modul…
artemcm May 5, 2025
dd9adeb
Merge pull request #81241 from edymtt/edymtt/add-builtin-float-dep-fo…
edymtt May 6, 2025
9ab6a62
[swift-settings] Increment the module format.
gottesmm May 6, 2025
2269a35
Merge pull request #81336 from gottesmm/pr-0747843c301e0b44f6f0646234…
mikeash May 6, 2025
84058a7
Merge pull request #81286 from eeckstein/temprvalue-opt
eeckstein May 6, 2025
22f1105
Merge pull request #81302 from AnthonyLatsis/stomata
AnthonyLatsis May 6, 2025
bc2efd6
Merge pull request #81319 from atrick/remove-fixmes
atrick May 6, 2025
c2a1081
Merge pull request #80681 from compnerd/mimalloc
compnerd May 6, 2025
69f8a6f
Merge pull request #81313 from artemcm/DepScanVariantError
artemcm May 6, 2025
ced96aa
[concurrency] Ensure that we treat closures that are nonisolated(nons…
gottesmm May 6, 2025
4517a6e
Merge pull request #81279 from AnthonyLatsis/fix-rebranch-on-main
AnthonyLatsis May 6, 2025
bc22bcd
[stdlib] remove TODOs
glessard May 6, 2025
d0445f3
[test] remove more copies of `_overrideLifetime()`
glessard May 1, 2025
aee6a52
Merge pull request #81296 from DougGregor/infer-nonisolated-conforman…
DougGregor May 6, 2025
4f4141f
Frontend: Obsolete `-fixit-all` and `-emit-fixits-path`
AnthonyLatsis May 4, 2025
b0b0cff
[NFC][test] Move scattered `DiagnosticVerifier` tests into subdirectory
AnthonyLatsis Mar 18, 2025
c66d6c7
Merge pull request #81338 from gottesmm/pr-e2235199764eea9659e0893269…
gottesmm May 7, 2025
d8c3942
Merge pull request #81224 from glessard/override-lifetime-publicly
glessard May 7, 2025
88de665
Merge pull request #81280 from AnthonyLatsis/arachnocampa-luminosa
AnthonyLatsis May 7, 2025
921d6d8
Merge pull request #81332 from al45tair/eng/PR-148899609
al45tair May 7, 2025
0c53692
Manually merge branch 'main' into rebranch
AnthonyLatsis May 7, 2025
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
/test/Generics/ @hborla @slavapestov
/test/Generics/inverse* @kavon
/test/IDE/ @ahoppen @bnbarham @hamishknight @rintaro
/test/IRGen/ @rjmccall
/test/IRGen/ @AnthonyLatsis @rjmccall
/test/Index/ @ahoppen @bnbarham @hamishknight @rintaro
/test/Interop/ @zoecarver @egorzhdan @Xazax-hun @j-hui @fahadnayyar @susmonteiro @hnrklssn
/test/Macros/SwiftifyImport @hnrklssn @Xazax-hun
Expand Down
1 change: 0 additions & 1 deletion Runtimes/Core/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ add_library(swiftCore
StringWordBreaking.swift
Substring.swift
SwiftNativeNSArray.swift
SwiftSettings.swift
TemporaryAllocation.swift
ThreadLocalStorage.swift
UIntBuffer.swift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ struct AliasAnalysis {
case let copy as SourceDestAddrInstruction:
let mayRead = memLoc.mayAlias(with: copy.source, self)
let mayWrite = memLoc.mayAlias(with: copy.destination, self)
var effects = SideEffects.Memory(read: mayRead, write: mayWrite || (mayRead && copy.isTakeOfSrc))
if !copy.isInitializationOfDest {
var effects = SideEffects.Memory(read: mayRead, write: mayWrite || (mayRead && copy.isTakeOfSource))
if !copy.isInitializationOfDestination {
effects.merge(with: defaultEffects(of: copy, on: memLoc))
}
return effects
Expand Down
37 changes: 37 additions & 0 deletions SwiftCompilerSources/Sources/Optimizer/DataStructures/Set.swift
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,44 @@ struct SpecificInstructionSet<InstType: Instruction> : IntrusiveSet {
}
}

/// An `InstructionSet` which also provides a `count` property.
struct SpecificInstructionSetWithCount<InstType: Instruction> : IntrusiveSet {
private(set) var count = 0
private var underlyingSet: SpecificInstructionSet<InstType>

init(_ context: some Context) {
self.underlyingSet = SpecificInstructionSet(context)
}

func contains(_ inst: InstType) -> Bool { underlyingSet.contains(inst) }

var isEmpty: Bool { count == 0 }

/// Returns true if `inst` was not contained in the set before inserting.
@discardableResult
mutating func insert(_ inst: InstType) -> Bool {
if underlyingSet.insert(inst) {
count += 1
return true
}
return false
}

mutating func erase(_ inst: InstType) {
if underlyingSet.contains(inst) {
count -= 1
assert(count >= 0)
}
underlyingSet.erase(inst)
}

var description: String { underlyingSet.description }

mutating func deinitialize() { underlyingSet.deinitialize() }
}

typealias InstructionSet = SpecificInstructionSet<Instruction>
typealias InstructionSetWithCount = SpecificInstructionSetWithCount<Instruction>

/// A set of operands.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ swift_compiler_sources(Optimizer
SimplificationPasses.swift
StackPromotion.swift
StripObjectHeaders.swift
TempRValueElimination.swift
)
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ private struct CollectedEffects {
addEffects(.read, to: copy.source)
addEffects(.write, to: copy.destination)

if !copy.isTakeOfSrc {
if !copy.isTakeOfSource {
addEffects(.copy, to: copy.source)
}
if !copy.isInitializationOfDest {
if !copy.isInitializationOfDestination {
addDestroyEffects(ofAddress: copy.destination)
}

Expand Down Expand Up @@ -494,7 +494,7 @@ private struct ArgumentEscapingWalker : ValueDefUseWalker, AddressDefUseWalker {
case let copy as CopyAddrInst:
if address == copy.sourceOperand &&
!address.value.hasTrivialType &&
(!function.hasOwnership || copy.isTakeOfSrc) {
(!function.hasOwnership || copy.isTakeOfSource) {
foundTakingLoad = true
}
return .continueWalk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private func constructLetInitRegion(

case let copy as CopyAddrInst
where copy.destination.isLetFieldAddress(of: markUninitialized):
assert(copy.isInitializationOfDest)
assert(copy.isInitializationOfDestination)
initRegion.insert(inst)

case let beginAccess as BeginAccessInst
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ private struct LifetimeVariable {

private init(introducer: Value, _ context: some Context) {
if let arg = introducer as? FunctionArgument {
self.varDecl = arg.varDecl
self.varDecl = arg.findVarDecl()
self.sourceLoc = arg.sourceLoc
self.isArgument = true
self.isClosureCapture = arg.isClosureCapture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,19 +194,7 @@ private func createEndCOWMutationIfNeeded(lifetimeDep: LifetimeDependence, _ con
}
scoped = beginApply
// None of the below cases can generate a mutable address.
case let .owned:
fallthrough
case let .borrowed:
fallthrough
case let .local:
fallthrough
case let .initialized:
fallthrough
case let .caller:
fallthrough
case let .global:
fallthrough
case let .unknown:
case .owned, .borrowed, .local, .initialized, .caller, .global, .unknown:
return
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private func findCopyForNRVO(for outArg: FunctionArgument) -> CopyAddrInst? {
// %local = alloc_stack $T
// store %in to %local : $*T
// copy_addr %local to [init] %out : $*T
if !copyToArg.isTakeOfSrc {
if !copyToArg.isTakeOfSource {
return nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ extension CopyAddrInst : LoadingInstruction {
return false
}
if !parentFunction.hasOwnership {
if !isTakeOfSrc || !isInitializationOfDest {
if !isTakeOfSource || !isInitializationOfDestination {
// For simplicity, bail if we would have to insert compensating retains and releases.
return false
}
Expand Down
Loading