File tree Expand file tree Collapse file tree 4 files changed +23
-1
lines changed
include/swift/SILOptimizer/PassManager
lib/SILOptimizer/PassManager Expand file tree Collapse file tree 4 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 23
23
#endif
24
24
25
25
PASSPIPELINE(Diagnostic, "Guaranteed Passes")
26
+ PASSPIPELINE(LowerHopToActor, "Lower Hop to Actor")
26
27
PASSPIPELINE(OwnershipEliminator, "Utility pass to just run the ownership eliminator pass")
27
28
PASSPIPELINE(Performance, "Passes run at -O")
28
29
PASSPIPELINE(Onone, "Passes run at -Onone")
Original file line number Diff line number Diff line change @@ -39,7 +39,10 @@ namespace swift {
39
39
// / Run all SIL passes for -Onone on module \p M.
40
40
void runSILPassesForOnone (SILModule &M);
41
41
42
- // / Run the SIL ownership eliminator pass on \p M.
42
+ // / Run the SIL lower hop-to-actor pass on \p M.
43
+ bool runSILLowerHopToActorPass (SILModule &M);
44
+
45
+ // / Run the SIL ownership eliminator pass on \p M.
43
46
bool runSILOwnershipEliminatorPass (SILModule &M);
44
47
45
48
void runSILOptimizationPassesWithFileSpecification (SILModule &Module,
Original file line number Diff line number Diff line change @@ -185,6 +185,14 @@ SILPassPipelinePlan::getDiagnosticPassPipeline(const SILOptions &Options) {
185
185
return P;
186
186
}
187
187
188
+ SILPassPipelinePlan SILPassPipelinePlan::getLowerHopToActorPassPipeline (
189
+ const SILOptions &Options) {
190
+ SILPassPipelinePlan P (Options);
191
+ P.startPipeline (" Lower Hop to Actor" );
192
+ P.addLowerHopToActor ();
193
+ return P;
194
+ }
195
+
188
196
// ===----------------------------------------------------------------------===//
189
197
// Ownership Eliminator Pipeline
190
198
// ===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change @@ -74,6 +74,16 @@ bool swift::runSILDiagnosticPasses(SILModule &Module) {
74
74
return Ctx.hadError ();
75
75
}
76
76
77
+ bool swift::runSILLowerHopToActorPass (SILModule &Module) {
78
+ auto &Ctx = Module.getASTContext ();
79
+
80
+ auto &opts = Module.getOptions ();
81
+ executePassPipelinePlan (
82
+ &Module, SILPassPipelinePlan::getLowerHopToActorPassPipeline (opts));
83
+
84
+ return Ctx.hadError ();
85
+ }
86
+
77
87
bool swift::runSILOwnershipEliminatorPass (SILModule &Module) {
78
88
auto &Ctx = Module.getASTContext ();
79
89
You can’t perform that action at this time.
0 commit comments