GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "tree.h"
#include "gimple.h"
#include "predict.h"
#include "ssa.h"
#include "fold-const.h"
#include "cfgloop.h"
#include "gimple-iterator.h"
#include "tree-cfg.h"
#include "tree-ssa-threadupdate.h"
#include "tree-ssa-scopedtables.h"
#include "tree-ssa-threadedge.h"
#include "gimple-fold.h"
#include "cfganal.h"
#include "alloc-pool.h"
#include "vr-values.h"
#include "gimple-range.h"
#include "gimple-range-path.h"
Functions | |
void | set_ssa_name_value (tree name, tree value) |
static bool | has_phis_p (basic_block bb) |
static bool | empty_block_with_phis_p (basic_block bb) |
static bool | potentially_threadable_block (basic_block bb) |
static tree | threadedge_valueize (tree t) |
void | propagate_threaded_block_debug_into (basic_block dest, basic_block src) |
bool | edge_forwards_cmp_to_conditional_jump_through_empty_bb_p (edge e) |
bool | single_succ_to_potentially_threadable_block (basic_block bb) |
Variables | |
static int | stmt_count |
vec< tree > | ssa_name_values |
There are basic blocks look like: <P0> p0 = a CMP b ; or p0 = (INT) (a CMP b) goto <X>; <P1> p1 = c CMP d goto <X>; <X> # phi = PHI <p0 (P0), p1 (P1)> if (phi != 0) goto <Y>; else goto <Z>; Then, edge (P0,X) or (P1,X) could be marked as EDGE_START_JUMP_THREAD And edge (X,Y), (X,Z) is EDGE_COPY_SRC_JOINER_BLOCK Return true if E is (P0,X) or (P1,X)
References CONVERT_EXPR_CODE_P, dyn_cast(), gimple_assign_rhs1(), gimple_assign_rhs_code(), gimple_bb(), gimple_cond_code(), gimple_cond_lhs(), gimple_cond_rhs(), has_single_use(), integer_onep(), integer_zerop(), last_and_only_stmt(), NULL, PHI_ARG_DEF_FROM_EDGE, safe_dyn_cast(), SSA_NAME_DEF_STMT, tcc_comparison, TREE_CODE, and TREE_CODE_CLASS.
Referenced by jump_threader::thread_across_edge().
|
static |
Return TRUE for a block with PHIs but no statements.
References gsi_end_p(), gsi_start_nondebug_bb(), and has_phis_p().
Referenced by potentially_threadable_block(), and jump_threader::thread_through_normal_block().
|
inlinestatic |
References gsi_end_p(), and gsi_start_phis().
Referenced by empty_block_with_phis_p(), and jump_threader::thread_around_empty_blocks().
|
static |
Return TRUE if we may be able to thread an incoming edge into BB to an outgoing edge from BB. Return FALSE otherwise.
References empty_block_with_phis_p(), gsi_end_p(), gsi_last_bb(), gsi_stmt(), single_pred_p(), and single_succ_p().
Referenced by single_succ_to_potentially_threadable_block(), and jump_threader::thread_outgoing_edges().
void propagate_threaded_block_debug_into | ( | basic_block | dest, |
basic_block | src ) |
Copy debug stmts from DEST's chain of single predecessors up to SRC, so that we don't lose the bindings as PHI nodes are introduced when DEST gains new predecessors.
References hash_set< KeyId, Lazy, Traits >::add(), gcc_checking_assert, gcc_unreachable, gimple_copy(), gimple_debug_bind_get_var(), gimple_debug_bind_p(), gimple_debug_nonbind_marker_p(), gimple_debug_source_bind_get_var(), gimple_debug_source_bind_p(), gsi_after_labels(), gsi_end_p(), gsi_insert_before(), gsi_last_bb(), GSI_NEW_STMT, gsi_next(), gsi_prev(), gsi_stmt(), i, is_gimple_debug(), MAY_HAVE_DEBUG_BIND_STMTS, NULL, si, single_pred(), and single_pred_p().
Referenced by jump_threader::thread_across_edge().
Set the value for the SSA name NAME to VALUE.
References drop_tree_overflow(), ssa_name_values, SSA_NAME_VERSION, and TREE_OVERFLOW_P.
Referenced by const_and_copies::pop_to_marker(), const_and_copies::record_const_or_copy_raw(), record_equivalences_from_phis(), and record_equivalences_from_stmt().
bool single_succ_to_potentially_threadable_block | ( | basic_block | bb | ) |
Return TRUE if BB has a single successor to a block with multiple incoming and outgoing edges.
References EDGE_COMPLEX, potentially_threadable_block(), single_succ(), single_succ_edge(), and single_succ_p().
Referenced by jump_threader::thread_outgoing_edges().
Valueize hook for gimple_fold_stmt_to_constant_1.
References SSA_NAME_VALUE, and TREE_CODE.
Referenced by jt_state::register_equivs_stmt().
Array to record value-handles per SSA_NAME.
Referenced by jump_threader::jump_threader(), set_ssa_name_value(), and jump_threader::~jump_threader().
|
static |
SSA Jump Threading Copyright (C) 2005-2024 Free Software Foundation, Inc. Contributed by Jeff Law <law@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/>.
To avoid code explosion due to jump threading, we limit the number of statements we are going to copy. This variable holds the number of statements currently seen that we'll have to copy as part of the jump threading process.
Referenced by jump_threader::record_temporary_equivalences_from_phis(), jump_threader::record_temporary_equivalences_from_stmts_at_dest(), and jump_threader::thread_across_edge().