11template<
bool>
class LoopTreeBuilder;
25 class Base :
public fe::RuntimeCast<Base> {
48 auto children()
const {
return children_.view(); }
49 const Base*
child(
size_t i)
const {
return children_[i].get(); }
72 size_t index()
const {
return index_; }
85 const Head*
root()
const {
return root_.get(); }
90 nodes.push_back(node);
91 if (
auto head = node->template isa<Head>())
92 for (
const auto& child : head->children()) get_nodes(nodes, child.get());
95 const CFG<forward>& cfg_;
96 typename CFG<forward>::template Map<Leaf*> leaves_;
97 std::unique_ptr<Head> root_;
Represents a node of a loop nesting forest.
size_t num_cf_nodes() const
Vector< const CFNode * > cf_nodes_
const Head * parent() const
Base(Head *parent, int depth, View< const CFNode * >)
A Head owns further nodes as children.
const Base * child(size_t i) const
size_t num_children() const
A Leaf only holds a single CFNode and does not have any children.
size_t index() const
Index of a DFS of LoopTree::Leafs.
const CFNode * cf_node() const
Calculates a loop nesting forest rooted at LoopTree::root_.
friend std::ostream & operator<<(std::ostream &, const typename LoopTree< f >::Base *)
const CFG< forward > & cfg() const
LoopTree & operator=(LoopTree)=delete
const Head * root() const
const Leaf * operator[](const CFNode *n) const
LoopTree(const LoopTree &)=delete
This is a thin wrapper for std::span<T, N> with the following additional features:
This is a thin wrapper for absl::InlinedVector<T, N, / A> which in turn is a drop-in replacement for ...
Value * find(IndexMap< Indexer, Key, Value * > &map, Key key)