Skip to content

Commit d93167f

Browse files
committed
No need to preserve BasicCalleeAnalysis from invalidation in FunctionSignatureOpts and GenericSpecializer anymore.
Because now the BasicCalleeAnalysis is not invalidated anyway by these optimizations. It’s only invalidated by DeadFunctionElimination.
1 parent a0079ba commit d93167f

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

lib/SILOptimizer/Transforms/FunctionSignatureOpts.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
#define DEBUG_TYPE "sil-function-signature-opt"
3333
#include "swift/SILOptimizer/Analysis/ARCAnalysis.h"
34-
#include "swift/SILOptimizer/Analysis/BasicCalleeAnalysis.h"
3534
#include "swift/SILOptimizer/Analysis/CallerAnalysis.h"
3635
#include "swift/SILOptimizer/Analysis/EpilogueARCAnalysis.h"
3736
#include "swift/SILOptimizer/Analysis/RCIdentityAnalysis.h"
@@ -935,9 +934,6 @@ class FunctionSignatureOpts : public SILFunctionTransform {
935934
auto *RCIA = getAnalysis<RCIdentityAnalysis>();
936935
auto *EA = PM->getAnalysis<EpilogueARCAnalysis>();
937936

938-
// Lock BCA so it's not invalidated along with the rest of the call graph.
939-
AnalysisPreserver BCAP(PM->getAnalysis<BasicCalleeAnalysis>());
940-
941937
// As we optimize the function more and more, the name of the function is
942938
// going to change, make sure the mangler is aware of all the changes done
943939
// to the function.

lib/SILOptimizer/Transforms/GenericSpecializer.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
#include "swift/SIL/SILFunction.h"
2121
#include "swift/SIL/SILInstruction.h"
22-
#include "swift/SILOptimizer/Analysis/BasicCalleeAnalysis.h"
2322
#include "swift/SILOptimizer/Utils/Generics.h"
2423
#include "swift/SILOptimizer/Utils/Local.h"
2524
#include "swift/SILOptimizer/PassManager/Transforms.h"
@@ -39,9 +38,6 @@ class GenericSpecializer : public SILFunctionTransform {
3938
DEBUG(llvm::dbgs() << "***** GenericSpecializer on function:" << F.getName()
4039
<< " *****\n");
4140

42-
// Lock BCA so it's not invalidated along with the rest of the call graph.
43-
AnalysisPreserver BCAP(PM->getAnalysis<BasicCalleeAnalysis>());
44-
4541
if (specializeAppliesInFunction(F))
4642
invalidateAnalysis(SILAnalysis::InvalidationKind::Everything);
4743
}

0 commit comments

Comments
 (0)