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 2323#endif
2424
2525PASSPIPELINE(Diagnostic, "Guaranteed Passes")
26+ PASSPIPELINE(LowerHopToActor, "Lower Hop to Actor")
2627PASSPIPELINE(OwnershipEliminator, "Utility pass to just run the ownership eliminator pass")
2728PASSPIPELINE(Performance, "Passes run at -O")
2829PASSPIPELINE(Onone, "Passes run at -Onone")
Original file line number Diff line number Diff line change @@ -39,7 +39,10 @@ namespace swift {
3939 // / Run all SIL passes for -Onone on module \p M.
4040 void runSILPassesForOnone (SILModule &M);
4141
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.
4346 bool runSILOwnershipEliminatorPass (SILModule &M);
4447
4548 void runSILOptimizationPassesWithFileSpecification (SILModule &Module,
Original file line number Diff line number Diff line change @@ -185,6 +185,14 @@ SILPassPipelinePlan::getDiagnosticPassPipeline(const SILOptions &Options) {
185185 return P;
186186}
187187
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+
188196// ===----------------------------------------------------------------------===//
189197// Ownership Eliminator Pipeline
190198// ===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change @@ -74,6 +74,16 @@ bool swift::runSILDiagnosticPasses(SILModule &Module) {
7474 return Ctx.hadError ();
7575}
7676
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+
7787bool swift::runSILOwnershipEliminatorPass (SILModule &Module) {
7888 auto &Ctx = Module.getASTContext ();
7989
You can’t perform that action at this time.
0 commit comments