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

#include <mim/nest.h>

Classes

struct  Children
 
struct  SiblDeps
 

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 Nodeinest () const
 Immediate nester/parent of this Node.
 
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
const Childrenchildren () const
 
Childrenchildren ()
 
Sibling Dependencies

These are the dependencies across children(): A child n depends() on m, if a subtree of n uses m.

template<bool Forward = true>
auto & sibl_deps ()
 
template<bool Forward = true>
const auto & sibl_deps () 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 123 of file nest.h.

Member Function Documentation

◆ children() [1/2]

Children & mim::Nest::Node::children ( )
inline

Definition at line 69 of file nest.h.

◆ children() [2/2]

const Children & mim::Nest::Node::children ( ) const
inline

Definition at line 68 of file nest.h.

◆ inest()

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

Immediate nester/parent of this Node.

Definition at line 19 of file nest.h.

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

◆ is_directly_recursive()

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

Definition at line 133 of file nest.h.

References is_recursive().

◆ is_mutually_recursive()

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

Definition at line 132 of file nest.h.

References is_recursive().

◆ is_recursive()

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

Definition at line 131 of file nest.h.

Referenced by is_directly_recursive(), and is_mutually_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 mim::Nest::Node::Children::contains(), mim::plug::clos::free_defs(), name(), mim::Nest::Node::Children::operator[](), and mim::post_order().

◆ 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.

References Nest.

Referenced by sibl_deps().

◆ SCCs()

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

Definition at line 129 of file nest.h.

◆ sibl_deps() [1/2]

template<bool Forward = true>
auto & mim::Nest::Node::sibl_deps ( )
inline

Definition at line 108 of file nest.h.

References nest().

Referenced by mim::Nest::lca(), and sibl_deps().

◆ sibl_deps() [2/2]

template<bool Forward = true>
const auto & mim::Nest::Node::sibl_deps ( ) const
inline

Definition at line 117 of file nest.h.

References sibl_deps().

◆ topo()

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

Topological sorting of all SCCs.

Definition at line 130 of file nest.h.

Friends And Related Symbol Documentation

◆ Nest

friend class Nest
friend

Definition at line 174 of file nest.h.

References Nest.

Referenced by Nest, and nest().


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