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

#include <mim/nest.h>

Public Types

using SCC = absl::flat_hash_set<const Node*>
 Strongly Connected Component.
 

Public Member Functions

Getters
std::string name () const
 
const Nestnest () const
 
const Nodeparent () const
 
bool is_root () const
 
Defmut () const
 The mutable capsulated in this Node or nullptr, if it's a virtual root comprising several Nodes.
 
uint32_t level () const
 
uint32_t loop_depth () const
 
Children
auto child_muts () const
 
auto child_nodes () const
 
auto child_mut2node () const
 
const Nodechild (Def *mut) const
 
size_t num_children () const
 
depends/controls

These are the dependencies across children():

auto depends () const
 
auto controls () const
 
size_t num_depends () const
 
SCCs

SCCs for all children dependencies.

Note
The Nest::root() cannot be is_mutually_recursive() by definition. If you have a set of mutually recursive Defs as "root", include them all by using a virtual root.
const auto & SCCs ()
 
const auto & topo () const
 Topological sorting of all SCCs.
 
bool is_recursive () const
 
bool is_mutually_recursive () const
 
bool is_directly_recursive () const
 

Friends

class Nest
 

Detailed Description

Definition at line 13 of file nest.h.

Member Typedef Documentation

◆ SCC

using mim::Nest::Node::SCC = absl::flat_hash_set<const Node*>

Strongly Connected Component.

Definition at line 64 of file nest.h.

Member Function Documentation

◆ child()

const Node * mim::Nest::Node::child ( Def * mut) const
inline

Definition at line 42 of file nest.h.

References mut().

◆ child_mut2node()

auto mim::Nest::Node::child_mut2node ( ) const
inline

Definition at line 37 of file nest.h.

◆ child_muts()

auto mim::Nest::Node::child_muts ( ) const
inline

Definition at line 32 of file nest.h.

◆ child_nodes()

auto mim::Nest::Node::child_nodes ( ) const
inline

Definition at line 33 of file nest.h.

◆ controls()

auto mim::Nest::Node::controls ( ) const
inline

Definition at line 57 of file nest.h.

◆ depends()

auto mim::Nest::Node::depends ( ) const
inline

Definition at line 54 of file nest.h.

Referenced by num_depends().

◆ is_directly_recursive()

bool mim::Nest::Node::is_directly_recursive ( ) const
inline

Definition at line 74 of file nest.h.

References is_recursive().

◆ is_mutually_recursive()

bool mim::Nest::Node::is_mutually_recursive ( ) const
inline

Definition at line 73 of file nest.h.

References is_recursive().

◆ is_recursive()

bool mim::Nest::Node::is_recursive ( ) const
inline

Definition at line 72 of file nest.h.

Referenced by is_directly_recursive(), is_mutually_recursive(), and mim::Nest::is_recursive().

◆ is_root()

bool mim::Nest::Node::is_root ( ) const
inline

Definition at line 20 of file nest.h.

Referenced by mut().

◆ level()

uint32_t mim::Nest::Node::level ( ) const
inline

Definition at line 26 of file nest.h.

Referenced by mim::Nest::lca().

◆ loop_depth()

uint32_t mim::Nest::Node::loop_depth ( ) const
inline

Definition at line 27 of file nest.h.

◆ mut()

Def * mim::Nest::Node::mut ( ) const
inline

The mutable capsulated in this Node or nullptr, if it's a virtual root comprising several Nodes.

Definition at line 22 of file nest.h.

References is_root().

Referenced by child(), mim::plug::clos::free_defs(), name(), mim::post_order(), and mim::Scheduler::root().

◆ name()

std::string mim::Nest::Node::name ( ) const
inline

Definition at line 17 of file nest.h.

References mut(), and mim::Def::unique_name().

◆ nest()

const Nest & mim::Nest::Node::nest ( ) const
inline

Definition at line 18 of file nest.h.

◆ num_children()

size_t mim::Nest::Node::num_children ( ) const
inline

Definition at line 46 of file nest.h.

◆ num_depends()

size_t mim::Nest::Node::num_depends ( ) const
inline

Definition at line 60 of file nest.h.

References depends().

◆ parent()

const Node * mim::Nest::Node::parent ( ) const
inline

Definition at line 19 of file nest.h.

Referenced by mim::Nest::lca().

◆ SCCs()

const auto & mim::Nest::Node::SCCs ( )
inline

Definition at line 70 of file nest.h.

◆ topo()

const auto & mim::Nest::Node::topo ( ) const
inline

Topological sorting of all SCCs.

Definition at line 71 of file nest.h.

Friends And Related Symbol Documentation

◆ Nest

friend class Nest
friend

Definition at line 116 of file nest.h.


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