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 {
441
441
442
442
// / The entry point to this function transformation.
443
443
void run () override ;
444
+
445
+ void verifyOwnership ();
444
446
};
445
447
446
448
} // end anonymous namespace
@@ -635,14 +637,19 @@ void CopyPropagation::run() {
635
637
invalidateAnalysis (SILAnalysis::InvalidationKind::Instructions);
636
638
accessBlockAnalysis->unlockInvalidation ();
637
639
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 ();
642
641
}
643
642
}
644
643
}
645
644
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
+
646
653
// MandatoryCopyPropagation is not currently enabled in the -Onone pipeline
647
654
// because it may negatively affect the debugging experience.
648
655
SILTransform *swift::createMandatoryCopyPropagation () {
You can’t perform that action at this time.
0 commit comments