Skip to content

Commit 11a702d

Browse files
authored
[opt][NewPM] Add isRequired to passes named as *VerifierPass (llvm#76517)
In this patch all passes named as *VerifierPass are being marked as required. That should make sure that the passes are executed without being skipped due to standard instrumentations. For example opt -passes='verify<loops>,verify<scalar-evolution>' ... will no longer skip running the verifications for functions marked as optnone. Partial fix for: llvm#76762
1 parent 6b21948 commit 11a702d

File tree

7 files changed

+8
-0
lines changed

7 files changed

+8
-0
lines changed

llvm/include/llvm/Analysis/LoopInfo.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,7 @@ class LoopPrinterPass : public PassInfoMixin<LoopPrinterPass> {
586586
/// Verifier pass for the \c LoopAnalysis results.
587587
struct LoopVerifierPass : public PassInfoMixin<LoopVerifierPass> {
588588
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
589+
static bool isRequired() { return true; }
589590
};
590591

591592
/// The legacy pass manager's analysis pass to compute loop information.

llvm/include/llvm/Analysis/MemorySSA.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,7 @@ class MemorySSAWalkerPrinterPass
973973
/// Verifier pass for \c MemorySSA.
974974
struct MemorySSAVerifierPass : PassInfoMixin<MemorySSAVerifierPass> {
975975
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
976+
static bool isRequired() { return true; }
976977
};
977978

978979
/// Legacy analysis pass which computes \c MemorySSA.

llvm/include/llvm/Analysis/RegionInfo.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,7 @@ class RegionInfoPrinterPass : public PassInfoMixin<RegionInfoPrinterPass> {
990990
/// Verifier pass for the \c RegionInfo.
991991
struct RegionInfoVerifierPass : PassInfoMixin<RegionInfoVerifierPass> {
992992
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
993+
static bool isRequired() { return true; }
993994
};
994995

995996
template <>

llvm/include/llvm/Analysis/ScalarEvolution.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2246,6 +2246,7 @@ class ScalarEvolutionVerifierPass
22462246
: public PassInfoMixin<ScalarEvolutionVerifierPass> {
22472247
public:
22482248
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
2249+
static bool isRequired() { return true; }
22492250
};
22502251

22512252
/// Printer pass for the \c ScalarEvolutionAnalysis results.

llvm/include/llvm/IR/Dominators.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ class DominatorTreePrinterPass
300300
/// Verifier pass for the \c DominatorTree.
301301
struct DominatorTreeVerifierPass : PassInfoMixin<DominatorTreeVerifierPass> {
302302
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
303+
static bool isRequired() { return true; }
303304
};
304305

305306
/// Enables verification of dominator trees.

llvm/include/llvm/IR/SafepointIRVerifier.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class SafepointIRVerifierPass : public PassInfoMixin<SafepointIRVerifierPass> {
4040
explicit SafepointIRVerifierPass() = default;
4141

4242
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
43+
44+
static bool isRequired() { return true; }
4345
};
4446
}
4547

llvm/include/llvm/Transforms/Utils/PredicateInfo.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ class PredicateInfoPrinterPass
221221
/// Verifier pass for \c PredicateInfo.
222222
struct PredicateInfoVerifierPass : PassInfoMixin<PredicateInfoVerifierPass> {
223223
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
224+
static bool isRequired() { return true; }
224225
};
225226

226227
} // end namespace llvm

0 commit comments

Comments
 (0)