GCC Middle and Back End API Reference
tree-iterator.c File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "gimple.h"
#include "tree-iterator.h"
#include "ggc.h"
#include "gt-tree-iterator.h"
Include dependency graph for tree-iterator.c:

Functions

tree alloc_stmt_list ()
void free_stmt_list ()
static void append_to_statement_list_1 ()
void append_to_statement_list ()
void append_to_statement_list_force ()
void tsi_link_before ()
void tsi_link_after ()
void tsi_delink ()
tree expr_first ()
tree expr_last ()

Variables

static vec< tree, va_gc > * stmt_list_cache

Function Documentation

tree alloc_stmt_list ( void  )

References TREE_SET_CODE.

Referenced by append_to_statement_list_1().

void append_to_statement_list ( )

Add T to the end of the list container pointed to by LIST_P. If T is an expression with no effects, it is ignored.

Referenced by tsan_pass().

static void append_to_statement_list_1 ( )
static

A subroutine of append_to_statement_list{,_force}. T is not NULL.

References alloc_stmt_list(), and TREE_CODE.

void append_to_statement_list_force ( )

Similar, but the statement is always added, regardless of side effects.

References tree_stmt_iterator::container, and gcc_assert.

tree expr_first ( )

Return the first expression in a sequence of COMPOUND_EXPRs, or in a STATEMENT_LIST.

References NULL_TREE, STATEMENT_LIST_TAIL, TREE_CODE, and TREE_OPERAND.

tree expr_last ( )

Return the last expression in a sequence of COMPOUND_EXPRs, or in a STATEMENT_LIST.

void free_stmt_list ( )

Referenced by tsi_link_before().

void tsi_delink ( )

Remove a stmt from the tree list. The iterator is updated to point to the next stmt.

void tsi_link_after ( )

Links a statement, or a chain of statements, after the current stmt.

 Die on looping.   
     Empty statement lists need no work.   
 Link it into the list.   
 Update the iterator, if requested.   
void tsi_link_before ( )

Links a statement, or a chain of statements, before the current stmt.

 Die on looping.   
     Empty statement lists need no work.   
 Link it into the list.   
 Update the iterator, if requested.   

References free_stmt_list(), gcc_assert, NULL, STATEMENT_LIST_HEAD, and STATEMENT_LIST_TAIL.


Variable Documentation

vec<tree, va_gc>* stmt_list_cache
static

Iterator routines for manipulating GENERIC and GIMPLE tree statements. Copyright (C) 2003-2013 Free Software Foundation, Inc. Contributed by Andrew MacLeod amacl.nosp@m.eod@.nosp@m.redha.nosp@m.t.co.nosp@m.m

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/. This is a cache of STATEMENT_LIST nodes. We create and destroy them fairly often during gimplification.