File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
lib/SILPasses/UtilityPasses Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change 10
10
//
11
11
// ===----------------------------------------------------------------------===//
12
12
13
- #include " swift/SILAnalysis/CallGraph.h"
14
- #include " swift/SILAnalysis/CallGraphAnalysis.h"
15
13
#include " swift/SILPasses/Passes.h"
16
14
#include " swift/SILPasses/Transforms.h"
17
15
#include " swift/SIL/SILModule.h"
@@ -38,20 +36,15 @@ void swift::performSILLinking(SILModule *M, bool LinkAll) {
38
36
39
37
namespace {
40
38
39
+ // / Copies code from the standard library into the user program to enable
40
+ // / optimizations.
41
41
class SILLinker : public SILModuleTransform {
42
42
43
- // / The entry point to the transformation.
44
43
void run () override {
45
- // Copies code from the standard library into the user program to enable
46
- // optimizations.
47
- auto *CGA = PM->getAnalysis <CallGraphAnalysis>();
48
- auto *CG = CGA->getCallGraphOrNull ();
49
- CallGraphLinkerEditor Editor (CG);
50
44
SILModule &M = *getModule ();
51
45
for (auto &Fn : M)
52
- if (M.linkFunction (&Fn, SILModule::LinkingMode::LinkAll,
53
- Editor.getCallback ()))
54
- invalidateAnalysis (&Fn, SILAnalysis::InvalidationKind::Instructions);
46
+ if (M.linkFunction (&Fn, SILModule::LinkingMode::LinkAll))
47
+ invalidateAnalysis (&Fn, SILAnalysis::InvalidationKind::Everything);
55
48
}
56
49
57
50
StringRef getName () override { return " SIL Linker" ; }
You can’t perform that action at this time.
0 commit comments