GCC Middle and Back End API Reference
loops_list Class Reference

#include <cfgloop.h>

Collaboration diagram for loops_list:

Data Structures

class  Iter

Public Types

using iterator = Iter<class loop *>
using const_iterator = Iter<const class loop *>

Public Member Functions

 loops_list (function *fn, unsigned flags, class loop *root=nullptr)
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const

Private Member Functions

void walk_loop_tree (class loop *root, unsigned flags)

Private Attributes

auto_vec< int, 16 > to_visit

Detailed Description

A list for visiting loops, which contains the loop numbers instead of
the loop pointers.  If the loop ROOT is offered (non-null), the visiting
will start from it, otherwise it would start from the tree_root of
loops_for_fn (FN) instead.  The scope is restricted in function FN and
the visiting order is specified by FLAGS.   

Member Typedef Documentation

◆ const_iterator

◆ iterator

Constructor & Destructor Documentation

◆ loops_list()

loops_list::loops_list ( function * fn,
unsigned flags,
class loop * root = nullptr )
Set up the loops list to visit according to the specified
function scope FN and iterating order FLAGS.  If ROOT is
not null, the visiting would start from it, otherwise it
will start from tree_root of loops_for_fn (FN).   

References fn, gcc_assert, ggc_alloc(), i, loop::inner, loops::larray, LI_FROM_INNERMOST, LI_INCLUDE_ROOT, LI_ONLY_INNERMOST, loops_for_fn(), NULL, loop::num, number_of_loops(), to_visit, loops::tree_root, vec_safe_iterate(), and walk_loop_tree().

Member Function Documentation

◆ begin() [1/2]

iterator loops_list::begin ( )

◆ begin() [2/2]

const_iterator loops_list::begin ( ) const

◆ end() [1/2]

iterator loops_list::end ( )

References to_visit.

◆ end() [2/2]

const_iterator loops_list::end ( ) const

References to_visit.

◆ walk_loop_tree()

void loops_list::walk_loop_tree ( class loop * root,
unsigned flags )
Starting from loop tree ROOT, walk loop tree as the visiting
order specified by FLAGS.  The supported visiting orders
  - Preorder (if neither of above is specified)   

References gcc_assert, ggc_alloc(), loop::inner, LI_FROM_INNERMOST, LI_INCLUDE_ROOT, LI_ONLY_INNERMOST, loop_outer(), NULL, loop::num, and to_visit.

Referenced by loops_list().

Field Documentation

◆ fn

function* loops_list::fn

Referenced by loops_list().

◆ to_visit

auto_vec<int, 16> loops_list::to_visit

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