Skip to content

Commit e5d3ccf

Browse files
authored
Merge pull request #3372 from gottesmm/sil-disable-skipping-passes
[pass-manager] Add an option -sil-disable-skipping-passes that ensure…
2 parents ebc47e4 + 571c8b5 commit e5d3ccf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/SILOptimizer/PassManager/PassManager.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ llvm::cl::opt<bool> SILVerifyWithoutInvalidation(
9595
"sil-verify-without-invalidation", llvm::cl::init(false),
9696
llvm::cl::desc("Verify after passes even if the pass has not invalidated"));
9797

98+
llvm::cl::opt<bool> SILDisableSkippingPasses(
99+
"sil-disable-skipping-passes", llvm::cl::init(false),
100+
llvm::cl::desc("Do not skip passes even if nothing was changed"));
98101

99102
static llvm::ManagedStatic<std::vector<unsigned>> DebugPassNumbers;
100103

@@ -290,7 +293,8 @@ void SILPassManager::runPassesOnFunction(PassList FuncTransforms,
290293

291294
// If nothing changed since the last run of this pass, we can skip this
292295
// pass.
293-
if (completedPasses.test((size_t)SFT->getPassKind())) {
296+
if (completedPasses.test((size_t)SFT->getPassKind()) &&
297+
!SILDisableSkippingPasses) {
294298
if (SILPrintPassName)
295299
llvm::dbgs() << "(Skip) Stage: " << StageName
296300
<< " Pass: " << SFT->getName()

0 commit comments

Comments
 (0)