We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 547d87f commit 0dd0ba6Copy full SHA for 0dd0ba6
tools/sil-opt/SILOpt.cpp
@@ -465,10 +465,13 @@ static llvm::cl::opt<std::string> EnableRequirementMachine(
465
466
static void runCommandLineSelectedPasses(SILModule *Module,
467
irgen::IRGenModule *IRGenMod) {
468
- auto &opts = Module->getOptions();
+ const SILOptions &opts = Module->getOptions();
469
+ // If a specific pass was requested with -opt-mode=None, run the pass as a
470
+ // mandatory pass.
471
+ bool isMandatory = opts.OptMode == OptimizationMode::NoOptimization;
472
executePassPipelinePlan(
473
Module, SILPassPipelinePlan::getPassPipelineForKinds(opts, Passes),
- /*isMandatory*/ false, IRGenMod);
474
+ isMandatory, IRGenMod);
475
476
if (Module->getOptions().VerifyAll)
477
Module->verify();
0 commit comments