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

Stage hook for compile.named_phase, compile.named_pass, and compile.named_repl. More...

Inheritance diagram for Named:
[legend]

Public Member Functions

 Named (World &w, flags_t a)
void apply (const App *app) final
 Invoked if your Stage has additional args.
bool redirects () const override
 If true, Stage::create uses take_resolved().
std::unique_ptr< Stagetake_resolved () override
 The Stage to use instead; nullptr means elide.
Public Member Functions inherited from mim::Stage
 Stage (World &world, std::string name)
 Stage (World &world, flags_t annex)
virtual ~Stage ()=default
virtual std::unique_ptr< Stagerecreate ()
 Creates a new instance; needed by a fixed-point PhaseMan.
virtual void apply (Stage &)
 Dito, but invoked by Stage::recreate.
Worldworld ()
Driverdriver ()
Loglog () const
std::string_view name () const
flags_t annex () const

Additional Inherited Members

Static Public Member Functions inherited from mim::Stage
static std::unique_ptr< Stagecreate (const Flags2Stages &stages, const Def *def)
template<class A, class P>
static void hook (Flags2Stages &stages)
Protected Attributes inherited from mim::Stage
std::string name_

Detailed Description

Stage hook for compile.named_phase, compile.named_pass, and compile.named_repl.

Reads the fully-qualified annex name (e.g. "clos.clos_conv_phase") from the driving App at stage-build time, looks up the matching annex Def in the current World, and redirects Stage::create to that annex's own Stage. 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/passes/repls simply skips it.

Definition at line 34 of file compile.cpp.

Constructor & Destructor Documentation

◆ Named()

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

Definition at line 36 of file compile.cpp.

References mim::Stage::Stage().

Member Function Documentation

◆ apply()

void Named::apply ( const App * )
inlinefinalvirtual

Invoked if your Stage has additional args.

Reimplemented from mim::Stage.

Definition at line 39 of file compile.cpp.

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

◆ redirects()

bool Named::redirects ( ) const
inlineoverridevirtual

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

Reimplemented from mim::Stage.

Definition at line 52 of file compile.cpp.

◆ take_resolved()

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

The Stage to use instead; nullptr means elide.

Reimplemented from mim::Stage.

Definition at line 53 of file compile.cpp.


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