Skip to content

Commit ea42e2f

Browse files
committed
Enabling copy propagation enables lexical lifetimes.
The effect of passing -enable-copy-propagation is both to enable the CopyPropagation pass to shorten object lifetimes and also to enable lexical lifetimes to ensure that object lifetimes aren't shortened while a variable is still in scope and used. Add a new flag, -enable-lexical-borrow-scopes=true to override -enable-copy-propagation's effect (setting it to ::ExperimentalLate) on SILOptions::LexicalLifetimes that sets it to ::Early even in the face of -enable-copy-propagation. The old flag -disable-lexical-lifetimes is renamed to -enable-lexical-borrow-scopes=false but continues to set that option to ::Off even when -enable-copy-propagation is passed.
1 parent d03b23c commit ea42e2f

26 files changed

+143
-67
lines changed

include/swift/AST/DiagnosticsFrontend.def

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ ERROR(error_unknown_arg,none,
8080
"unknown argument: '%0'", (StringRef))
8181
ERROR(error_invalid_arg_value,none,
8282
"invalid value '%1' in '%0'", (StringRef, StringRef))
83+
ERROR(error_invalid_arg_combination,none,
84+
"unsupported argument combination: '%0' and '%1'", (StringRef, StringRef))
8385
WARNING(warning_invalid_locale_code,none,
8486
"unsupported locale code; supported locale codes are: '%0'", (StringRef))
8587
WARNING(warning_locale_path_not_found,none,

include/swift/Option/FrontendOptions.td

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ def dependency_scan_cache_remarks : Flag<["-"], "Rdependency-scan-cache">,
213213
HelpText<"Emit remarks indicating use of the serialized module dependency scanning cache.">;
214214

215215
def enable_copy_propagation : Flag<["-"], "enable-copy-propagation">,
216-
HelpText<"Run SIL copy propagation to shorten object lifetime.">;
216+
HelpText<"Run SIL copy propagation with lexical lifetimes to shorten object "
217+
"lifetimes while preserving variable lifetimes.">;
217218
def disable_copy_propagation : Flag<["-"], "disable-copy-propagation">,
218219
HelpText<"Don't run SIL copy propagation to preserve object lifetime.">;
219220

@@ -259,15 +260,18 @@ def enable_experimental_concurrency :
259260
Flag<["-"], "enable-experimental-concurrency">,
260261
HelpText<"Enable experimental concurrency model">;
261262

262-
def disable_lexical_lifetimes :
263-
Flag<["-"], "disable-lexical-lifetimes">,
264-
HelpText<"Disables early lexical lifetimes. Mutually exclusive with "
265-
"-enable-lexical-lifetimes">;
266-
263+
def enable_lexical_borrow_scopes :
264+
Joined<["-"], "enable-lexical-borrow-scopes=">,
265+
HelpText<"Whether to emit lexical borrow scopes (default: true)">,
266+
MetaVarName<"true|false">;
267+
267268
def enable_lexical_lifetimes :
269+
Joined<["-"], "enable-lexical-lifetimes=">,
270+
HelpText<"Whether to enable lexical lifetimes">,
271+
MetaVarName<"true|false">;
272+
def enable_lexical_lifetimes_noArg :
268273
Flag<["-"], "enable-lexical-lifetimes">,
269-
HelpText<"Enable lexical lifetimes. Mutually exclusive with "
270-
"-disable-lexical-lifetimes">;
274+
HelpText<"Enable lexical lifetimes">;
271275

272276
def enable_experimental_move_only :
273277
Flag<["-"], "enable-experimental-move-only">,

lib/Frontend/CompilerInvocation.cpp

Lines changed: 79 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,21 +1449,88 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
14491449
// -Ounchecked might also set removal of runtime asserts (cond_fail).
14501450
Opts.RemoveRuntimeAsserts |= Args.hasArg(OPT_RemoveRuntimeAsserts);
14511451

1452-
// If experimental move only is enabled, always enable lexical lifetime as
1453-
// well. Move only depends on lexical lifetimes.
1454-
bool enableExperimentalLexicalLifetimes =
1455-
Args.hasArg(OPT_enable_lexical_lifetimes) ||
1456-
Args.hasArg(OPT_enable_experimental_move_only);
1457-
// Error if both experimental lexical lifetimes and disable lexical lifetimes
1458-
// are both set.
1459-
if (enableExperimentalLexicalLifetimes &&
1460-
Args.hasArg(OPT_disable_lexical_lifetimes)) {
1452+
Optional<bool> enableLexicalBorrowScopesFlag;
1453+
if (Arg *A = Args.getLastArg(OPT_enable_lexical_borrow_scopes)) {
1454+
enableLexicalBorrowScopesFlag =
1455+
llvm::StringSwitch<Optional<bool>>(A->getValue())
1456+
.Case("true", true)
1457+
.Case("false", false)
1458+
.Default(None);
1459+
}
1460+
Optional<bool> enableLexicalLifetimesFlag;
1461+
if (Arg *A = Args.getLastArg(OPT_enable_lexical_lifetimes)) {
1462+
enableLexicalLifetimesFlag =
1463+
llvm::StringSwitch<Optional<bool>>(A->getValue())
1464+
.Case("true", true)
1465+
.Case("false", false)
1466+
.Default(None);
1467+
}
1468+
if (Args.getLastArg(OPT_enable_lexical_lifetimes_noArg)) {
1469+
if (!enableLexicalLifetimesFlag.getValueOr(true)) {
1470+
// Error if lexical lifetimes have been disabled via the meta-var form
1471+
// and enabled via the flag.
1472+
Diags.diagnose(SourceLoc(), diag::error_invalid_arg_combination,
1473+
"enable-lexical-lifetimes",
1474+
"enable-lexical-lifetimes=false");
1475+
return true;
1476+
} else {
1477+
enableLexicalLifetimesFlag = true;
1478+
}
1479+
}
1480+
1481+
if (enableLexicalLifetimesFlag.getValueOr(false) &&
1482+
!enableLexicalBorrowScopesFlag.getValueOr(true)) {
1483+
// Error if lexical lifetimes have been enabled but lexical borrow scopes--
1484+
// on which they are dependent--have been disabled.
1485+
Diags.diagnose(SourceLoc(), diag::error_invalid_arg_combination,
1486+
"enable-lexical-lifetimes=true",
1487+
"enable-lexical-borrow-scopes=false");
14611488
return true;
1462-
} else {
1463-
if (enableExperimentalLexicalLifetimes)
1489+
}
1490+
1491+
if (Args.hasArg(OPT_enable_experimental_move_only) &&
1492+
(enableLexicalBorrowScopesFlag.getValueOr(false))) {
1493+
// Error if move-only is enabled and lexical borrow scopes--on which it
1494+
// depends--has been disabled.
1495+
Diags.diagnose(SourceLoc(), diag::error_invalid_arg_combination,
1496+
"enable-experimental-move-only",
1497+
"enable-lexical-borrow-scopes=false");
1498+
return true;
1499+
}
1500+
1501+
if (Args.hasArg(OPT_enable_experimental_move_only) &&
1502+
(enableLexicalLifetimesFlag.getValueOr(false))) {
1503+
// Error if move-only is enabled and lexical lifetimes--on which it
1504+
// depends--has been disabled.
1505+
Diags.diagnose(SourceLoc(), diag::error_invalid_arg_combination,
1506+
"enable-experimental-move-only",
1507+
"enable-lexical-lifetimes=false");
1508+
return true;
1509+
}
1510+
1511+
// -enable-copy-propagation implies -enable-lexical-lifetimes unless
1512+
// otherwise specified.
1513+
if (Args.hasArg(OPT_enable_copy_propagation))
1514+
Opts.LexicalLifetimes = LexicalLifetimesOption::ExperimentalLate;
1515+
1516+
// If move-only is enabled, always enable lexical lifetime as well. Move-only
1517+
// depends on lexical lifetimes.
1518+
if (Args.hasArg(OPT_enable_experimental_move_only))
1519+
Opts.LexicalLifetimes = LexicalLifetimesOption::ExperimentalLate;
1520+
1521+
if (enableLexicalLifetimesFlag) {
1522+
if (*enableLexicalLifetimesFlag) {
14641523
Opts.LexicalLifetimes = LexicalLifetimesOption::ExperimentalLate;
1465-
if (Args.hasArg(OPT_disable_lexical_lifetimes))
1524+
} else {
1525+
Opts.LexicalLifetimes = LexicalLifetimesOption::Early;
1526+
}
1527+
}
1528+
if (enableLexicalBorrowScopesFlag) {
1529+
if (*enableLexicalBorrowScopesFlag) {
1530+
Opts.LexicalLifetimes = LexicalLifetimesOption::Early;
1531+
} else {
14661532
Opts.LexicalLifetimes = LexicalLifetimesOption::Off;
1533+
}
14671534
}
14681535

14691536
Opts.EnableCopyPropagation |= Args.hasArg(OPT_enable_copy_propagation);

lib/SILOptimizer/Utils/CanonicalizeInstruction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ broadenSingleElementStores(StoreInst *storeInst,
415415
/// borrow scope--copy/destroy is insufficient by itself.
416416
///
417417
/// FIXME: Technically this should be guarded by a compiler flag like
418-
/// -enable-copy-propagation until SILGen protects scoped variables by borrow
419-
/// scopes.
418+
/// -enable-copy-propagation until SILGen protects scoped variables by
419+
/// borrow scopes.
420420
static SILBasicBlock::iterator
421421
eliminateSimpleCopies(CopyValueInst *cvi, CanonicalizeInstruction &pass) {
422422
auto next = std::next(cvi->getIterator());

test/AutoDiff/validation-test/array.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-run-simple-swift(-Xfrontend -disable-lexical-lifetimes)
1+
// RUN: %target-run-simple-swift(-Xfrontend -enable-lexical-borrow-scopes=false)
22

33
// REQUIRES: executable_test
44

test/AutoDiff/validation-test/optional.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-run-simple-swift(-Xfrontend -disable-lexical-lifetimes)
1+
// RUN: %target-run-simple-swift(-Xfrontend -enable-lexical-borrow-scopes=false)
22

33
// REQUIRES: executable_test
44

test/AutoDiff/validation-test/optional_property.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-run-simple-swift(-Xfrontend -disable-lexical-lifetimes)
2-
// RUN: %target-swift-emit-sil -Xllvm -debug-only=differentiation -disable-lexical-lifetimes -module-name null -o /dev/null 2>&1 %s | %FileCheck %s
1+
// RUN: %target-run-simple-swift(-Xfrontend -enable-lexical-borrow-scopes=false)
2+
// RUN: %target-swift-emit-sil -Xllvm -debug-only=differentiation -enable-lexical-borrow-scopes=false -module-name null -o /dev/null 2>&1 %s | %FileCheck %s
33

44
// REQUIRES: executable_test
55
// REQUIRES: asserts

test/Concurrency/Runtime/async_properties_actor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-run-simple-swift(-parse-as-library -Xfrontend -enable-copy-propagation -Xfrontend -disable-availability-checking %import-libdispatch) | %FileCheck %s
1+
// RUN: %target-run-simple-swift(-parse-as-library -Xfrontend -enable-copy-propagation -Xfrontend -enable-lexical-lifetimes=false -Xfrontend -disable-availability-checking %import-libdispatch) | %FileCheck %s
22

33
// REQUIRES: executable_test
44
// REQUIRES: concurrency

test/DebugInfo/if-branchlocations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %target-swift-frontend %s -emit-sil -disable-copy-propagation -emit-verbose-sil -g -o - | %FileCheck %s --check-prefixes=CHECK,CHECK-NCP
2-
// RUN: %target-swift-frontend %s -emit-sil -enable-copy-propagation -disable-lexical-lifetimes -emit-verbose-sil -g -o - | %FileCheck %s --check-prefixes=CHECK,CHECK-CP
2+
// RUN: %target-swift-frontend %s -emit-sil -enable-copy-propagation -enable-lexical-borrow-scopes=false -emit-verbose-sil -g -o - | %FileCheck %s --check-prefixes=CHECK,CHECK-CP
33

44
class NSURL {}
55

test/DebugInfo/linetable-do.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -Xllvm -sil-full-demangle %s -emit-ir -g -o - | %FileCheck %s
22
// RUN: %target-swift-frontend -Xllvm -sil-full-demangle -disable-copy-propagation %s -emit-sil -emit-verbose-sil -g -o - | %FileCheck --check-prefixes=CHECK-SIL,CHECK-NCP %s
3-
// RUN: %target-swift-frontend -Xllvm -sil-full-demangle -enable-copy-propagation -disable-lexical-lifetimes %s -emit-sil -emit-verbose-sil -g -o - | %FileCheck --check-prefixes=CHECK-SIL,CHECK-CP %s
3+
// RUN: %target-swift-frontend -Xllvm -sil-full-demangle -enable-copy-propagation -enable-lexical-borrow-scopes=false %s -emit-sil -emit-verbose-sil -g -o - | %FileCheck --check-prefixes=CHECK-SIL,CHECK-CP %s
44
import StdlibUnittest
55

66
class Obj {}

test/IRGen/debug_poison.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -primary-file %s -emit-ir -Onone -enable-copy-propagation -disable-lexical-lifetimes | %FileCheck %s -DINT=i%target-ptrsize
1+
// RUN: %target-swift-frontend -primary-file %s -emit-ir -Onone -enable-copy-propagation -enable-lexical-borrow-scopes=false | %FileCheck %s -DINT=i%target-ptrsize
22

33
// Test debug_value [poison] emission
44

test/IRGen/unmanaged_objc_throw_func.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -emit-ir -enable-copy-propagation %s | %FileCheck %s
1+
// RUN: %target-swift-frontend -emit-ir -enable-copy-propagation -enable-lexical-lifetimes=false %s | %FileCheck %s
22
// REQUIRES: objc_interop
33
// REQUIRES: optimized_stdlib
44

test/Interpreter/builtin_bridge_object.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-run-simple-swift(-Onone -parse-stdlib -Xfrontend -enable-copy-propagation -Xfrontend -disable-lexical-lifetimes) | %FileCheck %s --check-prefixes=CHECK,CHECK-DBG
2-
// RUN: %target-run-simple-swift(-O -parse-stdlib -Xfrontend -enable-copy-propagation -Xfrontend -disable-lexical-lifetimes) | %FileCheck --check-prefixes=CHECK,CHECK-OPT %s
1+
// RUN: %target-run-simple-swift(-Onone -parse-stdlib -Xfrontend -enable-copy-propagation -Xfrontend -enable-lexical-borrow-scopes=false) | %FileCheck %s --check-prefixes=CHECK,CHECK-DBG
2+
// RUN: %target-run-simple-swift(-O -parse-stdlib -Xfrontend -enable-copy-propagation -Xfrontend -enable-lexical-borrow-scopes=false) | %FileCheck --check-prefixes=CHECK,CHECK-OPT %s
33

44
// REQUIRES: executable_test
55
// REQUIRES: objc_interop

test/SILOptimizer/OSLogFullOptTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -emit-ir -swift-version 5 -O -enable-copy-propagation -primary-file %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
1+
// RUN: %target-swift-frontend -emit-ir -swift-version 5 -O -enable-copy-propagation -enable-lexical-lifetimes=false -primary-file %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
22
//
33
// REQUIRES: VENDOR=apple
44
// REQUIRES: swift_stdlib_no_asserts

test/SILOptimizer/allocbox_to_stack.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-sil-opt -sil-print-debuginfo -enable-sil-verify-all %s -allocbox-to-stack -disable-lexical-lifetimes | %FileCheck %s
1+
// RUN: %target-sil-opt -sil-print-debuginfo -enable-sil-verify-all %s -allocbox-to-stack -enable-lexical-borrow-scopes=false | %FileCheck %s
22

33
sil_stage raw
44

test/SILOptimizer/allocbox_to_stack_ownership.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-sil-opt -enable-sil-verify-all %s -allocbox-to-stack -disable-lexical-lifetimes | %FileCheck %s
1+
// RUN: %target-sil-opt -enable-sil-verify-all %s -allocbox-to-stack -enable-lexical-borrow-scopes=false | %FileCheck %s
22

33
sil_stage raw
44

test/SILOptimizer/assemblyvision_remark/basic.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swiftc_driver -O -Rpass-missed=sil-assembly-vision-remark-gen -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xfrontend -enable-copy-propagation -emit-sil %s -o /dev/null -Xfrontend -verify -Xfrontend -disable-lexical-lifetimes
1+
// RUN: %target-swiftc_driver -O -Rpass-missed=sil-assembly-vision-remark-gen -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xfrontend -enable-copy-propagation -emit-sil %s -o /dev/null -Xfrontend -verify -Xfrontend -enable-lexical-borrow-scopes=false
22
// REQUIRES: optimized_stdlib,swift_stdlib_no_asserts
33

44
public class Klass {

test/SILOptimizer/assemblyvision_remark/basic_yaml.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// RUN: %target-swiftc_driver -O -Rpass-missed=sil-assembly-vision-remark-gen -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xfrontend -enable-copy-propagation -emit-sil %s -o /dev/null -Xfrontend -verify -Xfrontend -disable-lexical-lifetimes
1+
// RUN: %target-swiftc_driver -O -Rpass-missed=sil-assembly-vision-remark-gen -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xfrontend -enable-copy-propagation -emit-sil %s -o /dev/null -Xfrontend -verify -Xfrontend -enable-lexical-borrow-scopes=false
22

33
// RUN: %empty-directory(%t)
4-
// RUN: %target-swiftc_driver -wmo -O -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xfrontend -enable-copy-propagation -emit-sil -save-optimization-record=yaml -save-optimization-record-path %t/note.yaml -Xfrontend -disable-lexical-lifetimes %s -o /dev/null && %FileCheck --input-file=%t/note.yaml %s
4+
// RUN: %target-swiftc_driver -wmo -O -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xfrontend -enable-copy-propagation -emit-sil -save-optimization-record=yaml -save-optimization-record-path %t/note.yaml -Xfrontend -enable-lexical-borrow-scopes=false %s -o /dev/null && %FileCheck --input-file=%t/note.yaml %s
55

66
// REQUIRES: optimized_stdlib,swift_stdlib_no_asserts
77

test/SILOptimizer/diagnose_lifetime_issues.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -emit-sil -disable-lexical-lifetimes -enable-copy-propagation %s -o /dev/null -verify
1+
// RUN: %target-swift-frontend -emit-sil -enable-lexical-borrow-scopes=false -enable-copy-propagation %s -o /dev/null -verify
22

33
class Delegate {
44
func foo() { }

test/SILOptimizer/diagnose_lifetime_issues_objc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -emit-sil %s -disable-lexical-lifetimes -enable-copy-propagation -o /dev/null -verify
1+
// RUN: %target-swift-frontend -emit-sil %s -enable-lexical-borrow-scopes=false -enable-copy-propagation -o /dev/null -verify
22
// REQUIRES: objc_interop
33

44
import Foundation

test/SILOptimizer/opaque_values_mandatory.sil

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// RUN: %target-sil-opt -diagnostics -enable-sil-opaque-values %s | \
22
// RUN: %target-sil-opt -Onone-performance -enable-sil-verify-all \
33
// RUN: -enable-sil-opaque-values -emit-sorted-sil \
4-
// RUN: -enable-ossa-modules -enable-copy-propagation | \
4+
// RUN: -enable-ossa-modules -enable-copy-propagation \
5+
// RUN: -enable-lexical-borrow-scopes | \
56
// RUN: %FileCheck %s
67

78
import Builtin

test/SILOptimizer/outliner.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-swift-frontend -Osize -import-objc-header %S/Inputs/Outliner.h %s -emit-sil -enforce-exclusivity=unchecked -enable-copy-propagation -disable-lexical-lifetimes | %FileCheck %s
2-
// RUN: %target-swift-frontend -Osize -g -import-objc-header %S/Inputs/Outliner.h %s -emit-sil -enforce-exclusivity=unchecked -enable-copy-propagation -disable-lexical-lifetimes | %FileCheck %s
1+
// RUN: %target-swift-frontend -Osize -import-objc-header %S/Inputs/Outliner.h %s -emit-sil -enforce-exclusivity=unchecked -enable-copy-propagation -enable-lexical-borrow-scopes=false | %FileCheck %s
2+
// RUN: %target-swift-frontend -Osize -g -import-objc-header %S/Inputs/Outliner.h %s -emit-sil -enforce-exclusivity=unchecked -enable-copy-propagation -enable-lexical-borrow-scopes=false | %FileCheck %s
33

44
// REQUIRES: objc_interop
55
// REQUIRES: optimized_stdlib

test/SILOptimizer/sil_combine_apply_ossa.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-sil-opt -enable-ossa-modules -enable-copy-propagation -enable-sil-verify-all %s -sil-combine -sil-combine-disable-alloc-stack-opts | %FileCheck %s
1+
// RUN: %target-sil-opt -enable-ossa-modules -enable-copy-propagation -enable-lexical-lifetimes=false -enable-sil-verify-all %s -sil-combine -sil-combine-disable-alloc-stack-opts | %FileCheck %s
22

33
import Swift
44
import Builtin

test/SILOptimizer/sil_combine_ossa.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: %target-sil-opt -enable-objc-interop -enforce-exclusivity=none -enable-sil-verify-all %s -sil-combine -generic-specializer | %FileCheck %s --check-prefix=CHECK_FORWARDING_OWNERSHIP_KIND
33
//
44
// FIXME: check copy-propagation output instead once it is the default mode
5-
// RUN: %target-sil-opt -enable-objc-interop -enforce-exclusivity=none -enable-sil-verify-all %s -sil-combine -enable-copy-propagation | %FileCheck %s --check-prefix=CHECK_COPYPROP
5+
// RUN: %target-sil-opt -enable-objc-interop -enforce-exclusivity=none -enable-sil-verify-all %s -sil-combine -enable-copy-propagation -enable-lexical-lifetimes=false | %FileCheck %s --check-prefix=CHECK_COPYPROP
66

77
// Declare this SIL to be canonical because some tests break raw SIL
88
// conventions. e.g. address-type block args. -enforce-exclusivity=none is also

0 commit comments

Comments
 (0)