MimIR
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 = GIDSet<const Node*>
 Strongly Connected Component.

Public Member Functions

Getters
std::string name () const
const Nest & nest () const
const Node * inest () const
 Immediate nester/parent of this Node.
const Node * idom () const
 Immediate Dominator for children in connected components; used for late code placement in [Nest::lca].
bool is_root () const
Def * mut () 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
uint32_t gid () const
 Stable id for deterministic hashing/ordering: the underlying mut's gid, or 0 for the (unique) virtual root.
Children
const Children & children () const
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>
const SiblDeps & 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.
bool is_recursive () const
bool is_mutually_recursive () const
bool is_directly_recursive () const
const SCC & scc () const
 The SCC among its siblings this Node belongs to; the Nest::root() has none.

Friends

class Nest

Detailed Description

Definition at line 27 of file nest.h.

Member Typedef Documentation

◆ SCC

using mim::Nest::Node::SCC = GIDSet<const Node*>

Strongly Connected Component.

Definition at line 125 of file nest.h.

Member Function Documentation

◆ children()

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

Definition at line 82 of file nest.h.

Referenced by mim::Scheduler::schedule().

◆ gid()

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

Stable id for deterministic hashing/ordering: the underlying mut's gid, or 0 for the (unique) virtual root.

Definition at line 47 of file nest.h.

◆ idom()

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

Immediate Dominator for children in connected components; used for late code placement in [Nest::lca].

Definition at line 36 of file nest.h.

◆ inest()

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

Immediate nester/parent of this Node.

Definition at line 33 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_root(), and scc().

◆ is_mutually_recursive()

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

Definition at line 132 of file nest.h.

References is_recursive(), is_root(), and scc().

◆ 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 37 of file nest.h.

Referenced by is_directly_recursive(), is_mutually_recursive(), mut(), and scc().

◆ level()

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

Definition at line 43 of file nest.h.

◆ loop_depth()

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

Definition at line 44 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 39 of file nest.h.

References is_root().

Referenced by mim::Nest::Node::Children::contains(), name(), mim::Nest::Node::Children::operator[](), and mim::Scheduler::schedule().

◆ name()

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

Definition at line 31 of file nest.h.

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

◆ nest()

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

Definition at line 32 of file nest.h.

References Nest.

◆ scc()

const SCC & mim::Nest::Node::scc ( ) const
inline

The SCC among its siblings this Node belongs to; the Nest::root() has none.

Definition at line 135 of file nest.h.

References is_root().

Referenced by is_directly_recursive(), and is_mutually_recursive().

◆ sibl_deps()

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

Definition at line 116 of file nest.h.

◆ Nest

friend class Nest
friend

Definition at line 178 of file nest.h.

References Nest.

Referenced by Nest, and nest().


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