MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches

Phase hook for compile.named. More...

Inheritance diagram for Named:
[legend]

Public Member Functions

 Named (World &w, flags_t a)
void start () final
 Actual entry.
void apply (const App *app) final
 Invoked if your Phase has additional args.
bool redirects () const override
 If true, Phase::create uses take_resolved().
std::unique_ptr< Phasetake_resolved () override
 The Phase to use instead; nullptr means elide.
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 (Phase &)
 Dito, but invoked by Phase::recreate.
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.

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

Phase hook for compile.named.

Reads the fully-qualified annex name (e.g. "clos.clos_conv") from the driving App at phase-build time, looks up the matching annex Def in the current World, and redirects Phase::create to that annex's own Phase. If the plugin part of the name is not loaded or the annex is missing, it elides (resolves to nothing), so the enclosing compile.phases simply skips it.

Definition at line 28 of file compile.cpp.

Constructor & Destructor Documentation

◆ Named()

Named::Named ( World & w,
flags_t a )
inline

Definition at line 30 of file compile.cpp.

References mim::Phase::Phase().

Member Function Documentation

◆ apply()

void Named::apply ( const App * )
inlinefinalvirtual

Invoked if your Phase has additional args.

Reimplemented from mim::Phase.

Definition at line 35 of file compile.cpp.

References mim::Phase::annex(), mim::Phase::create(), mim::Phase::driver(), mim::tuple2str(), and mim::Phase::world().

◆ redirects()

bool Named::redirects ( ) const
inlineoverridevirtual

If true, Phase::create uses take_resolved().

Reimplemented from mim::Phase.

Definition at line 48 of file compile.cpp.

◆ start()

void Named::start ( )
inlinefinalvirtual

Actual entry.

Implements mim::Phase.

Definition at line 33 of file compile.cpp.

◆ take_resolved()

std::unique_ptr< Phase > Named::take_resolved ( )
inlineoverridevirtual

The Phase to use instead; nullptr means elide.

Reimplemented from mim::Phase.

Definition at line 49 of file compile.cpp.


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