Skip to content

Commit 62687e5

Browse files
committed
[SILOpt] Added -enable-copy-propagation flag.
The new flags sets the EnableCopyPropagation flag on the SILOpt[ion]s class used to determine the behavior of sil-opt.
1 parent efd9c45 commit 62687e5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/sil-opt/SILOpt.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ 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+
125129
namespace {
126130
enum class EnforceExclusivityMode {
127131
Unchecked, // static only
@@ -470,6 +474,7 @@ int main(int argc, char **argv) {
470474
SILOpts.EnableSpeculativeDevirtualization = EnableSpeculativeDevirtualization;
471475
SILOpts.IgnoreAlwaysInline = IgnoreAlwaysInline;
472476
SILOpts.EnableOSSAModules = EnableOSSAModules;
477+
SILOpts.EnableCopyPropagation = EnableCopyPropagation;
473478

474479
serialization::ExtendedValidationInfo extendedInfo;
475480
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> FileBufOrErr =

0 commit comments

Comments
 (0)