Skip to content

Commit 64f273c

Browse files
authored
Merge pull request #69437 from gottesmm/region-isolation-makeover
[region-isolation] Rename pass/feature flag and so some other cleanups.
2 parents e4f0d69 + 382609e commit 64f273c

File tree

103 files changed

+817
-814
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+817
-814
lines changed

include/swift/Basic/Features.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ EXPERIMENTAL_FEATURE(BuiltinModule, true)
218218
// Enable strict concurrency.
219219
EXPERIMENTAL_FEATURE(StrictConcurrency, true)
220220

221-
/// Defer Sendable checking to SIL diagnostic phase.
222-
EXPERIMENTAL_FEATURE(SendNonSendable, false)
221+
/// Region Based Isolation testing using the TransferNonSendable pass
222+
EXPERIMENTAL_FEATURE(RegionBasedIsolation, false)
223223

224224
/// Within strict concurrency, narrow global variable isolation requirements.
225225
EXPERIMENTAL_FEATURE(GlobalConcurrency, false)

include/swift/SILOptimizer/PassManager/Passes.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ PASS(TempRValueOpt, "temp-rvalue-opt",
367367
"Remove short-lived immutable temporary copies")
368368
PASS(IRGenPrepare, "irgen-prepare",
369369
"Cleanup SIL in preparation for IRGen")
370-
PASS(SendNonSendable, "send-non-sendable",
370+
PASS(TransferNonSendable, "transfer-non-sendable",
371371
"Checks calls that send non-sendable values between isolation domains")
372372
PASS(SILGenCleanup, "silgen-cleanup",
373373
"Cleanup SIL in preparation for diagnostics")

include/swift/SILOptimizer/Utils/PartitionUtils.h

Lines changed: 163 additions & 157 deletions
Large diffs are not rendered by default.

lib/AST/ASTPrinter.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3569,9 +3569,7 @@ static bool usesFeatureParameterPacks(Decl *decl) {
35693569
return false;
35703570
}
35713571

3572-
static bool usesFeatureSendNonSendable(Decl *decl) {
3573-
return false;
3574-
}
3572+
static bool usesFeatureRegionBasedIsolation(Decl *decl) { return false; }
35753573

35763574
static bool usesFeatureGlobalConcurrency(Decl *decl) { return false; }
35773575

lib/SILOptimizer/Mandatory/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ target_sources(swiftSILOptimizer PRIVATE
4242
PMOMemoryUseCollector.cpp
4343
RawSILInstLowering.cpp
4444
ReferenceBindingTransform.cpp
45-
SendNonSendable.cpp
45+
TransferNonSendable.cpp
4646
SILGenCleanup.cpp
4747
YieldOnceCheck.cpp
4848
OSLogOptimization.cpp

lib/SILOptimizer/Mandatory/SendNonSendable.cpp renamed to lib/SILOptimizer/Mandatory/TransferNonSendable.cpp

Lines changed: 241 additions & 242 deletions
Large diffs are not rendered by default.

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static void addMandatoryDiagnosticOptPipeline(SILPassPipelinePlan &P) {
133133
P.addAddressLowering();
134134

135135
P.addFlowIsolation();
136-
P.addSendNonSendable();
136+
P.addTransferNonSendable();
137137

138138
// Automatic differentiation: canonicalize all differentiability witnesses
139139
// and `differentiable_function` instructions.

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3182,7 +3182,7 @@ namespace {
31823182

31833183
// check if language features ask us to defer sendable diagnostics
31843184
// if so, don't check for sendability of arguments here
3185-
if (!ctx.LangOpts.hasFeature(Feature::SendNonSendable)) {
3185+
if (!ctx.LangOpts.hasFeature(Feature::RegionBasedIsolation)) {
31863186
diagnoseApplyArgSendability(apply, getDeclContext());
31873187
}
31883188

test/Concurrency/LLDBDebuggerFunctionActorExtension.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %target-swift-frontend -disable-availability-checking -debugger-support %s -emit-sil -o /dev/null -verify
22
// RUN: %target-swift-frontend -disable-availability-checking -debugger-support %s -emit-sil -o /dev/null -verify -strict-concurrency=targeted
33
// RUN: %target-swift-frontend -disable-availability-checking -debugger-support %s -emit-sil -o /dev/null -verify -strict-concurrency=complete
4-
// RUN: %target-swift-frontend -disable-availability-checking -debugger-support %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
4+
// RUN: %target-swift-frontend -disable-availability-checking -debugger-support %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature RegionBasedIsolation
55

66
// REQUIRES: concurrency
77
// REQUIRES: asserts

test/Concurrency/actor_call_implicitly_async.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %target-swift-frontend -disable-availability-checking -warn-concurrency -parse-as-library %s -emit-sil -o /dev/null -verify -verify-additional-prefix complete-
2-
// RUN: %target-swift-frontend -disable-availability-checking -warn-concurrency -parse-as-library %s -emit-sil -o /dev/null -verify -enable-experimental-feature SendNonSendable
2+
// RUN: %target-swift-frontend -disable-availability-checking -warn-concurrency -parse-as-library %s -emit-sil -o /dev/null -verify -enable-experimental-feature RegionBasedIsolation
33

44
// REQUIRES: concurrency
55
// REQUIRES: asserts

0 commit comments

Comments
 (0)