GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "tree-iterator.h"
#include "gt-tree-iterator.h"
Functions | |
tree | alloc_stmt_list (void) |
void | free_stmt_list (tree t) |
static void | append_to_statement_list_1 (tree t, tree *list_p) |
void | append_to_statement_list (tree t, tree *list_p) |
void | append_to_statement_list_force (tree t, tree *list_p) |
void | tsi_link_before (tree_stmt_iterator *i, tree t, enum tsi_iterator_update mode) |
void | tsi_link_after (tree_stmt_iterator *i, tree t, enum tsi_iterator_update mode) |
void | tsi_delink (tree_stmt_iterator *i) |
tree | expr_first (tree expr) |
tree | expr_last (tree expr) |
tree | expr_single (tree expr) |
Variables | |
static vec< tree, va_gc > * | stmt_list_cache |
tree alloc_stmt_list | ( | void | ) |
References make_node(), stmt_list_cache, TREE_SET_CODE, TREE_SIDE_EFFECTS, TREE_TYPE, vec_safe_is_empty(), and void_type_node.
Referenced by append_to_statement_list_1(), copy_statement_list(), and create_task_copyfn().
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.
References append_to_statement_list_1(), TREE_CODE, and TREE_SIDE_EFFECTS.
Referenced by asan_finish_file(), build_cdtor(), build_cxa_dtor_registrations(), build_gcov_exit_decl(), build_init_ctor(), create_task_copyfn(), emutls_common_1(), gimplify_expr(), gimplify_omp_affinity(), gimplify_omp_depend(), gimplify_omp_loop(), hwasan_finish_file(), lower_rec_input_clauses(), omp_apply_tile(), omp_maybe_apply_loop_xforms(), shortcut_cond_expr(), shortcut_cond_r(), and tsan_finish_file().
A subroutine of append_to_statement_list{,_force}. T is not NULL.
References alloc_stmt_list(), i, TREE_CODE, TSI_CONTINUE_LINKING, tsi_last(), and tsi_link_after().
Referenced by append_to_statement_list(), and append_to_statement_list_force().
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().
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(), NULL_TREE, STATEMENT_LIST_HEAD, TREE_CODE, and TREE_OPERAND.
Referenced by expr_first().
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(), 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().
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(), NULL_TREE, STATEMENT_LIST_HEAD, and TREE_CODE.
Referenced by expr_single(), protected_set_expr_location(), and protected_set_expr_location_if_unset().
void free_stmt_list | ( | tree | t | ) |
References gcc_assert, STATEMENT_LIST_HEAD, STATEMENT_LIST_TAIL, stmt_list_cache, and vec_safe_push().
Referenced by tsi_link_after(), and tsi_link_before().
void tsi_delink | ( | tree_stmt_iterator * | i | ) |
Remove a stmt from the tree list. The iterator is updated to point to the next stmt.
References i, STATEMENT_LIST_HEAD, STATEMENT_LIST_TAIL, and TREE_SIDE_EFFECTS.
Referenced by gimplify_omp_dispatch(), and gimplify_statement_list().
void tsi_link_after | ( | tree_stmt_iterator * | i, |
tree | t, | ||
enum tsi_iterator_update | mode ) |
Links a statement, or a chain of statements, after the current stmt.
References free_stmt_list(), gcc_assert, ggc_alloc(), i, NULL, STATEMENT_LIST_HEAD, STATEMENT_LIST_TAIL, TREE_CODE, TREE_SIDE_EFFECTS, TSI_CHAIN_END, TSI_CHAIN_START, TSI_CONTINUE_LINKING, TSI_NEW_STMT, and TSI_SAME_STMT.
Referenced by append_to_statement_list_1(), copy_statement_list(), and gimplify_bind_expr().
void tsi_link_before | ( | tree_stmt_iterator * | i, |
tree | t, | ||
enum tsi_iterator_update | mode ) |
Links a statement, or a chain of statements, before the current stmt.
References free_stmt_list(), gcc_assert, ggc_alloc(), i, NULL, STATEMENT_LIST_HEAD, STATEMENT_LIST_TAIL, TREE_CODE, TREE_SIDE_EFFECTS, TSI_CHAIN_END, TSI_CHAIN_START, TSI_CONTINUE_LINKING, TSI_NEW_STMT, and TSI_SAME_STMT.
Referenced by gimplify_bind_expr(), and gimplify_omp_dispatch().
Iterator routines for manipulating GENERIC and GIMPLE tree statements. Copyright (C) 2003-2024 Free Software Foundation, Inc. Contributed by Andrew MacLeod <amacleod@redhat.com> 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.
Referenced by alloc_stmt_list(), and free_stmt_list().