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

functionfn
 
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

using loops_list::const_iterator = Iter<const class loop *>

◆ iterator

using loops_list::iterator = Iter<class loop *>

Constructor & Destructor Documentation

◆ loops_list()

loops_list::loops_list ( function * fn,
unsigned flags,
class loop * root = nullptr )
inline
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, 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 ( )
inline

◆ begin() [2/2]

const_iterator loops_list::begin ( ) const
inline

◆ end() [1/2]

iterator loops_list::end ( )
inline

References to_visit.

◆ end() [2/2]

const_iterator loops_list::end ( ) const
inline

References to_visit.

◆ walk_loop_tree()

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

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

Referenced by loops_list().

Field Documentation

◆ fn

function* loops_list::fn
private

Referenced by loops_list().

◆ to_visit

auto_vec<int, 16> loops_list::to_visit
private

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