File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 11// RUN: %target-sil-opt -diagnostics -enable-sil-opaque-values %s | \
2- // RUN: %target-sil-opt -Onone-performance -enable-sil-opaque-values -emit-sorted-sil -sil-disable-pass=mandatory-copy-propagation | \
2+ // RUN: %target-sil-opt -Onone-performance -enable-sil-verify-all \
3+ // RUN: -enable-sil-opaque-values -emit-sorted-sil \
4+ // RUN: -enable-ossa-modules -enable-copy-propagation | \
35// RUN: %FileCheck %s
46
5- // Using -sil-disable-pass=mandatory-copy-propagation to pattern match
6- // against older SIL output. At least until -enable-copy-propagation
7- // has been around long enough in the same form to be worth rewriting
8- // CHECK lines.
9-
107import Builtin
118
129sil_stage raw
Original file line number Diff line number Diff line change @@ -122,6 +122,14 @@ static llvm::cl::opt<bool> EnableOSSAModules(
122122 " this is disabled we do not serialize in OSSA "
123123 " form when optimizing." ));
124124
125+ static llvm::cl::opt<bool > EnableCopyPropagation (
126+ " enable-copy-propagation" ,
127+ llvm::cl::desc (" Enable the copy propagation pass." ));
128+
129+ static llvm::cl::opt<bool > DisableCopyPropagation (
130+ " disable-copy-propagation" ,
131+ llvm::cl::desc (" Disable the copy propagation pass." ));
132+
125133namespace {
126134enum class EnforceExclusivityMode {
127135 Unchecked, // static only
@@ -470,6 +478,8 @@ int main(int argc, char **argv) {
470478 SILOpts.EnableSpeculativeDevirtualization = EnableSpeculativeDevirtualization;
471479 SILOpts.IgnoreAlwaysInline = IgnoreAlwaysInline;
472480 SILOpts.EnableOSSAModules = EnableOSSAModules;
481+ SILOpts.EnableCopyPropagation = EnableCopyPropagation;
482+ SILOpts.DisableCopyPropagation = DisableCopyPropagation;
473483
474484 serialization::ExtendedValidationInfo extendedInfo;
475485 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> FileBufOrErr =
You can’t perform that action at this time.
0 commit comments