GCC Middle and Back End API Reference
tree-iterator.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tree_stmt_iterator
 
class  tsi_range
 

Enumerations

enum  tsi_iterator_update {
  TSI_NEW_STMT , TSI_SAME_STMT , TSI_CHAIN_START , TSI_CHAIN_END ,
  TSI_CONTINUE_LINKING
}
 

Functions

tree_stmt_iterator tsi_start (tree t)
 
tree_stmt_iterator tsi_last (tree t)
 
bool tsi_end_p (tree_stmt_iterator i)
 
bool tsi_one_before_end_p (tree_stmt_iterator i)
 
void tsi_next (tree_stmt_iterator *i)
 
void tsi_prev (tree_stmt_iterator *i)
 
treetsi_stmt_ptr (tree_stmt_iterator i)
 
tree tsi_stmt (tree_stmt_iterator i)
 
void tsi_link_before (tree_stmt_iterator *, tree, enum tsi_iterator_update)
 
void tsi_link_after (tree_stmt_iterator *, tree, enum tsi_iterator_update)
 
void tsi_delink (tree_stmt_iterator *)
 
tree alloc_stmt_list (void)
 
void free_stmt_list (tree)
 
void append_to_statement_list (tree, tree *)
 
void append_to_statement_list_force (tree, tree *)
 
tree expr_first (tree)
 
tree expr_last (tree)
 
tree expr_single (tree)
 

Enumeration Type Documentation

◆ tsi_iterator_update

Enumerator
TSI_NEW_STMT 
TSI_SAME_STMT 
TSI_CHAIN_START 
TSI_CHAIN_END 
TSI_CONTINUE_LINKING 

Function Documentation

◆ alloc_stmt_list()

◆ append_to_statement_list()

◆ append_to_statement_list_force()

void append_to_statement_list_force ( tree t,
tree * list_p )
extern
Similar, but the statement is always added, regardless of side effects.   

References append_to_statement_list_1(), and NULL_TREE.

Referenced by gimplify_omp_affinity(), gimplify_omp_depend(), and gimplify_omp_for().

◆ expr_first()

tree expr_first ( tree expr)
extern
Return the first expression in a sequence of COMPOUND_EXPRs, or in
a STATEMENT_LIST, disregarding DEBUG_BEGIN_STMTs, recursing into a
STATEMENT_LIST if that's the first non-DEBUG_BEGIN_STMT.   

References expr, expr_first(), ggc_alloc(), NULL_TREE, STATEMENT_LIST_HEAD, TREE_CODE, and TREE_OPERAND.

Referenced by expr_first().

◆ expr_last()

tree expr_last ( tree expr)
extern
Return the last expression in a sequence of COMPOUND_EXPRs, or in a
STATEMENT_LIST, disregarding DEBUG_BEGIN_STMTs, recursing into a
STATEMENT_LIST if that's the last non-DEBUG_BEGIN_STMT.   

References expr, expr_last(), ggc_alloc(), NULL_TREE, STATEMENT_LIST_TAIL, TREE_CODE, and TREE_OPERAND.

Referenced by block_may_fallthru(), expr_last(), shortcut_cond_expr(), and tree_invalid_nonnegative_warnv_p().

◆ expr_single()

tree expr_single ( tree expr)
extern
If EXPR is a STATEMENT_LIST containing just DEBUG_BEGIN_STMTs and
a single other stmt, return that other stmt (recursively).
If it is a STATEMENT_LIST containing no non-DEBUG_BEGIN_STMTs or
multiple, return NULL_TREE.
Otherwise return EXPR.   

References expr, expr_single(), ggc_alloc(), NULL_TREE, STATEMENT_LIST_HEAD, and TREE_CODE.

Referenced by expr_single(), protected_set_expr_location(), and protected_set_expr_location_if_unset().

◆ free_stmt_list()

◆ tsi_delink()

void tsi_delink ( tree_stmt_iterator * i)
extern
Remove a stmt from the tree list.  The iterator is updated to point to
the next stmt.   

References ggc_alloc(), i, STATEMENT_LIST_HEAD, STATEMENT_LIST_TAIL, and TREE_SIDE_EFFECTS.

Referenced by gimplify_statement_list().

◆ tsi_end_p()

◆ tsi_last()

◆ tsi_link_after()

◆ tsi_link_before()

void tsi_link_before ( tree_stmt_iterator * i,
tree t,
enum tsi_iterator_update mode )
extern

◆ tsi_next()

◆ tsi_one_before_end_p()

bool tsi_one_before_end_p ( tree_stmt_iterator i)
inline

References i, and NULL.

Referenced by find_combined_omp_for(), find_goto(), and rexpr_location().

◆ tsi_prev()

void tsi_prev ( tree_stmt_iterator * i)
inline

◆ tsi_start()

◆ tsi_stmt()

◆ tsi_stmt_ptr()