MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::ClosedMutPhase< M > Class Template Referenceabstract

Transitively visits all reachable, closed mutables in the World. More...

#include <mim/phase.h>

Inheritance diagram for mim::ClosedMutPhase< M >:
[legend]

Public Member Functions

 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< Phaserecreate ()
 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< Phasetake_resolved ()
 The Phase to use instead; nullptr means elide.
Worldworld ()
Driverdriver ()
Loglog () const
std::string_view name () const
flags_t annex () const
const 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 Profiler counter key of the current run; no-op unless profiling is enabled.

Protected Member Functions

void start () override
 Actual entry.
virtual void visit (M *)=0
M * root () const

Additional Inherited Members

Static Public Member Functions inherited from mim::Phase
static std::unique_ptr< Phasecreate (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 Attributes inherited from mim::Phase
std::string name_

Detailed Description

template<class M = Def>
class mim::ClosedMutPhase< M >

Transitively visits all reachable, closed mutables in the World.

  • Select with elide_empty whether you want to visit trivial mutables without body.
  • Set schedule if the mutables should be scheduled to ensure a correct order of dependencies.
  • If you are only interested in specific mutables, you can pass this to M.
    See also
    ClosedMutPhase

Definition at line 464 of file phase.h.

Constructor & Destructor Documentation

◆ ClosedMutPhase() [1/2]

template<class M = Def>
mim::ClosedMutPhase< M >::ClosedMutPhase ( World & world,
std::string name,
bool elide_empty,
bool schedule = false )
inline

◆ ClosedMutPhase() [2/2]

template<class M = Def>
mim::ClosedMutPhase< M >::ClosedMutPhase ( World & world,
flags_t annex,
bool elide_empty,
bool schedule = false )
inline

Member Function Documentation

◆ elide_empty()

template<class M = Def>
bool mim::ClosedMutPhase< M >::elide_empty ( ) const
inline

Definition at line 475 of file phase.h.

Referenced by ClosedMutPhase(), ClosedMutPhase(), and start().

◆ root()

template<class M = Def>
M * mim::ClosedMutPhase< M >::root ( ) const
inlineprotected

Definition at line 483 of file phase.h.

◆ schedule()

template<class M = Def>
bool mim::ClosedMutPhase< M >::schedule ( ) const
inline

Definition at line 476 of file phase.h.

Referenced by ClosedMutPhase(), ClosedMutPhase(), and start().

◆ start()

template<class M = Def>
void mim::ClosedMutPhase< M >::start ( )
inlineoverrideprotectedvirtual

◆ visit()

template<class M = Def>
virtual void mim::ClosedMutPhase< M >::visit ( M * )
protectedpure virtual

Referenced by start().


The documentation for this class was generated from the following file: