File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
lib/SILOptimizer/Transforms Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -441,6 +441,8 @@ class CopyPropagation : public SILFunctionTransform {
441441
442442 // / The entry point to this function transformation.
443443 void run () override ;
444+
445+ void verifyOwnership ();
444446};
445447
446448} // end anonymous namespace
@@ -635,14 +637,19 @@ void CopyPropagation::run() {
635637 invalidateAnalysis (SILAnalysis::InvalidationKind::Instructions);
636638 accessBlockAnalysis->unlockInvalidation ();
637639 if (f->getModule ().getOptions ().VerifySILOwnership ) {
638- auto *deBlocksAnalysis = getAnalysis<DeadEndBlocksAnalysis>();
639- f->verifyOwnership (f->getModule ().getOptions ().OSSAVerifyComplete
640- ? nullptr
641- : deBlocksAnalysis->get (f));
640+ verifyOwnership ();
642641 }
643642 }
644643}
645644
645+ void CopyPropagation::verifyOwnership () {
646+ auto *f = getFunction ();
647+ auto *deBlocksAnalysis = getAnalysis<DeadEndBlocksAnalysis>();
648+ f->verifyOwnership (f->getModule ().getOptions ().OSSAVerifyComplete
649+ ? nullptr
650+ : deBlocksAnalysis->get (f));
651+ }
652+
646653// MandatoryCopyPropagation is not currently enabled in the -Onone pipeline
647654// because it may negatively affect the debugging experience.
648655SILTransform *swift::createMandatoryCopyPropagation () {
You can’t perform that action at this time.
0 commit comments