Makes each continuation's mem.M 0 chain total over the instructions of the Target, in a topological order. More...
#include <mim/plug/mach/schedule.h>
Public Member Functions | |
| Schedule (World &world, flags_t annex, const Target &target) | |
| Public Member Functions inherited from mim::NestPhase< Nest::Place::Late, Lam > | |
| NestPhase (World &world, std::string name, bool elide_empty, bool schedule=false) | |
| NestPhase (World &world, flags_t annex, bool elide_empty, bool schedule=false) | |
| const Nest & | nest () const |
| Public Member Functions inherited from mim::ClosedMutPhase< M > | |
| ClosedMutPhase (World &world, std::string name, bool elide_empty, bool schedule=false) | |
| ClosedMutPhase (World &world, flags_t annex, bool elide_empty, bool schedule=false) | |
| bool | elide_empty () const |
| bool | schedule () const |
| Public Member Functions inherited from mim::Phase | |
| Phase (World &world, std::string name) | |
| Phase (World &world, flags_t annex) | |
| virtual | ~Phase ()=default |
| virtual std::unique_ptr< Phase > | recreate () |
| Creates a new instance; needed by a fixed-point PhaseMan. | |
| virtual void | apply (const App *) |
| Invoked if your Phase has additional args. | |
| virtual void | apply (Phase &) |
| Dito, but invoked by Phase::recreate. | |
| virtual bool | redirects () const |
| If true, Phase::create uses take_resolved(). | |
| virtual std::unique_ptr< Phase > | take_resolved () |
| The Phase to use instead; nullptr means elide. | |
| World & | world () |
| Driver & | driver () |
| const fe::Log & | log () const |
| std::string_view | name () const |
| flags_t | annex () const |
| const fe::Vector< std::string > & | args () |
| Command-line arguments passed to this Phase's plugin via -X <plugin>:<arg>. | |
| bool | todo () const |
| void | invalidate (bool todo=true) |
| Signals that another round of fixed-point iteration is required, either as part of. | |
| virtual void | run () |
| Entry point and generates some debug output; invokes Phase::start. | |
| void | profile_count (std::string_view key, uint64_t n=1) |
Adds n to the custom fe::Profiler counter key of the current run; no-op unless profiling is enabled. | |
Private Member Functions | |
| void | visit (const Nest &) final |
| const Def * | rewrite (const Def *) final |
| const Def * | rewrite_imm_App (const App *) final |
Additional Inherited Members | |
| Static Public Member Functions inherited from mim::Phase | |
| static std::unique_ptr< Phase > | create (const Flags2Phases &phases, const Def *def) |
| template<class A, class P> | |
| static void | hook (Flags2Phases &phases) |
| template<class P, class... Args> | |
| static void | run (Args &&... args) |
| Runs a single Phase. | |
| Protected Member Functions inherited from mim::ClosedMutPhase< M > | |
| void | start () override |
| Actual entry. | |
| virtual void | visit (M *)=0 |
| M * | root () const |
| Protected Attributes inherited from mim::Phase | |
| std::string | name_ |
Makes each continuation's mem.M 0 chain total over the instructions of the Target, in a topological order.
Memory instructions are rethreaded onto the chain; all others are wrapped in mach.sched. Scheduler::smart picks the continuation of an instruction; a closed one is rematerialized right before each use. Every use of a memory token outside an instruction receives the end of the chain. No type changes, so each Nest is rewritten in place.
Definition at line 15 of file schedule.h.
Definition at line 17 of file schedule.h.
References mim::Phase::annex(), mim::NestPhase< Nest::Place::Late, Lam >::NestPhase(), mim::Rewriter::Rewriter(), and mim::Rewriter::world().
Reimplemented from mim::Rewriter.
Definition at line 36 of file schedule.cpp.
References mim::Def::is_set(), mim::Def::isa_mut(), mim::NestPhase< Nest::Place::Late, Lam >::nest(), and mim::Rewriter::rewrite().
Referenced by visit().
Reimplemented from mim::Rewriter.
Definition at line 45 of file schedule.cpp.
References mim::Def::blame(), and mim::Rewriter::rewrite_imm_App().
|
finalprivatevirtual |
Implements mim::NestPhase< Nest::Place::Late, Lam >.
Definition at line 25 of file schedule.cpp.
References mim::Def::is_set(), mim::Nest::muts(), mim::NestPhase< Nest::Place::Late, Lam >::nest(), mim::Rewriter::reset(), rewrite(), mim::ClosedMutPhase< M >::root(), and mim::Scheduler::Scheduler().