File tree Expand file tree Collapse file tree 2 files changed +20
-10
lines changed
include/swift/SILOptimizer/PassManager
lib/SILOptimizer/PassManager Expand file tree Collapse file tree 2 files changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -329,11 +329,7 @@ class SILPassManager {
329
329
~SILPassManager ();
330
330
331
331
// / Verify all analyses.
332
- void verifyAnalyses () const {
333
- for (auto *A : Analyses) {
334
- A->verify ();
335
- }
336
- }
332
+ void verifyAnalyses () const ;
337
333
338
334
// / Precompute all analyses.
339
335
void forcePrecomputeAnalyses (SILFunction *F) {
@@ -348,11 +344,7 @@ class SILPassManager {
348
344
// / Discussion: We leave it up to the analyses to decide how to implement
349
345
// / this. If no override is provided the SILAnalysis should just call the
350
346
// / normal verify method.
351
- void verifyAnalyses (SILFunction *F) const {
352
- for (auto *A : Analyses) {
353
- A->verify (F);
354
- }
355
- }
347
+ void verifyAnalyses (SILFunction *F) const ;
356
348
357
349
void executePassPipelinePlan (const SILPassPipelinePlan &Plan);
358
350
Original file line number Diff line number Diff line change @@ -726,6 +726,24 @@ void SILPassManager::runModulePass(unsigned TransIdx) {
726
726
}
727
727
}
728
728
729
+ void SILPassManager::verifyAnalyses () const {
730
+ if (Mod->getOptions ().VerifyNone )
731
+ return ;
732
+
733
+ for (auto *A : Analyses) {
734
+ A->verify ();
735
+ }
736
+ }
737
+
738
+ void SILPassManager::verifyAnalyses (SILFunction *F) const {
739
+ if (Mod->getOptions ().VerifyNone )
740
+ return ;
741
+
742
+ for (auto *A : Analyses) {
743
+ A->verify (F);
744
+ }
745
+ }
746
+
729
747
void SILPassManager::executePassPipelinePlan (const SILPassPipelinePlan &Plan) {
730
748
for (const SILPassPipeline &Pipeline : Plan.getPipelines ()) {
731
749
setStageName (Pipeline.Name );
You can’t perform that action at this time.
0 commit comments