Skip to content

Commit 7e5747b

Browse files
committed
[SILOpt] Added -disable-copy-propagation flag.
The new flags sets the DisableCopyPropagation flag on the SILOpt[ion]s class used to determine the behavior of sil-opt.
1 parent 9a0bdf3 commit 7e5747b

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
@@ -126,6 +126,10 @@ static llvm::cl::opt<bool> EnableCopyPropagation(
126126
"enable-copy-propagation",
127127
llvm::cl::desc("Enable the copy propagation pass."));
128128

129+
static llvm::cl::opt<bool> DisableCopyPropagation(
130+
"disable-copy-propagation",
131+
llvm::cl::desc("Disable the copy propagation pass."));
132+
129133
namespace {
130134
enum class EnforceExclusivityMode {
131135
Unchecked, // static only
@@ -475,6 +479,7 @@ int main(int argc, char **argv) {
475479
SILOpts.IgnoreAlwaysInline = IgnoreAlwaysInline;
476480
SILOpts.EnableOSSAModules = EnableOSSAModules;
477481
SILOpts.EnableCopyPropagation = EnableCopyPropagation;
482+
SILOpts.DisableCopyPropagation = DisableCopyPropagation;
478483

479484
serialization::ExtendedValidationInfo extendedInfo;
480485
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> FileBufOrErr =

0 commit comments

Comments
 (0)