MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::Cleanup Class Reference

Removes unreachable and dead code by rebuilding the whole World into a new one and swapping afterwards. More...

#include <mim/phase/phase.h>

Inheritance diagram for mim::Cleanup:
[legend]

Public Member Functions

 Cleanup (World &world)
 
void start () override
 Actual entry.
 
- Public Member Functions inherited from mim::Phase
 Phase (World &world, std::string_view name, bool dirty)
 
virtual ~Phase ()=default
 
Worldworld ()
 
std::string_view name () const
 
bool is_dirty () const
 
virtual void run ()
 Entry point and generates some debug output; invokes Phase::start.
 

Additional Inherited Members

- Static Public Member Functions inherited from mim::Phase
template<class P , class... Args>
static void run (Args &&... args)
 Runs a single Phase.
 
- Protected Member Functions inherited from mim::Phase
- Protected Attributes inherited from mim::Phase
Worldworld_
 
std::string name_
 
bool dirty_
 

Detailed Description

Removes unreachable and dead code by rebuilding the whole World into a new one and swapping afterwards.

Definition at line 63 of file phase.h.

Constructor & Destructor Documentation

◆ Cleanup()

mim::Cleanup::Cleanup ( World & world)
inline

Definition at line 65 of file phase.h.

Member Function Documentation

◆ start()

void mim::Cleanup::start ( )
overridevirtual

Actual entry.

Implements mim::Phase.

Definition at line 26 of file phase.cpp.

References mim::Def::as_mut(), mim::World::inherit(), mim::Rewriter::rewrite(), and mim::Phase::world().


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