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.
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().
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().