GCC Middle and Back End API Reference
tree-ssa-dom.c File Reference

Data Structures

struct  hashable_expr
struct  cond_equivalence_s
struct  edge_info
struct  expr_hash_elt
struct  expr_elt_hasher
struct  opt_stats_d

Typedefs

typedef struct cond_equivalence_s cond_equivalence
typedef struct expr_hash_eltexpr_hash_elt_t

Enumerations

enum  expr_kind {
  EXPR_SINGLE, EXPR_UNARY, EXPR_BINARY, EXPR_TERNARY,
  EXPR_CALL, EXPR_PHI
}

Functions

static bool hashable_expr_equal_p (const struct hashable_expr *, const struct hashable_expr *)
static void free_expr_hash_elt (void *)
static void optimize_stmt (basic_block, gimple_stmt_iterator)
static tree lookup_avail_expr (gimple, bool)
static hashval_t avail_expr_hash (const void *)
static void htab_statistics (FILE *, hash_table< expr_elt_hasher >)
static void record_cond (cond_equivalence *)
static void record_const_or_copy (tree, tree)
static void record_equality (tree, tree)
static void record_equivalences_from_phis (basic_block)
static void record_equivalences_from_incoming_edge (basic_block)
static void eliminate_redundant_computations (gimple_stmt_iterator *)
static void record_equivalences_from_stmt (gimple, int)
static void dom_thread_across_edge (struct dom_walk_data *, edge)
static void dom_opt_leave_block (struct dom_walk_data *, basic_block)
static void dom_opt_enter_block (struct dom_walk_data *, basic_block)
static void remove_local_expressions_from_table (void)
static void restore_vars_to_original_value (void)
static edge single_incoming_edge_ignoring_loop_edges (basic_block)
static void initialize_hash_element (gimple stmt, tree lhs, struct expr_hash_elt *element)
static void initialize_expr_from_cond ()
static void initialize_hash_element_from_expr (struct hashable_expr *expr, tree lhs, struct expr_hash_elt *element)
static hashval_t iterative_hash_hashable_expr ()
static void print_expr_hash_elt ()
static void free_expr_hash_elt_contents ()
static void free_expr_hash_elt ()
static struct edge_infoallocate_edge_info ()
static void free_all_edge_infos ()
static unsigned int tree_ssa_dominator_optimize ()
static bool gate_dominator ()
gimple_opt_passmake_pass_dominator ()
static void canonicalize_comparison ()
static tree simplify_stmt_for_jump_threading (gimple stmt, gimple within_stmt)
static void dom_thread_across_edge ()
static void record_equivalences_from_phis ()
static edge single_incoming_edge_ignoring_loop_edges ()
static void record_equivalences_from_incoming_edge ()
void dump_dominator_optimization_stats ()
DEBUG_FUNCTION void debug_dominator_optimization_stats ()
static void htab_statistics ()
static void record_cond ()
static void build_and_record_new_cond (enum tree_code code, tree op0, tree op1, vec< cond_equivalence > *p)
static void record_conditions ()
static void record_const_or_copy_1 ()
int loop_depth_of_name ()
static void record_const_or_copy ()
static void record_equality ()
bool simple_iv_increment_p ()
static void cprop_into_successor_phis ()
static void record_edge_info ()
static void dom_opt_leave_block ()
static void eliminate_redundant_computations ()
static void record_equivalences_from_stmt ()
static void cprop_operand ()
static void cprop_into_stmt ()
static void optimize_stmt ()
static tree lookup_avail_expr ()
static hashval_t avail_expr_hash ()
tree degenerate_phi_result ()
static void remove_stmt_or_phi ()
static tree get_rhs_or_phi_arg ()
static tree get_lhs_or_phi_result ()
static void propagate_rhs_into_lhs ()
static void eliminate_const_or_copy ()
static void eliminate_degenerate_phis_1 ()
static unsigned int eliminate_degenerate_phis ()
gimple_opt_passmake_pass_phi_only_cprop ()

Variables

static vec< expr_hash_elt_tavail_exprs_stack
static hash_table
< expr_elt_hasher
avail_exprs
static vec< treeconst_and_copies_stack
static bool cfg_altered
static bitmap need_eh_cleanup
static struct opt_stats_d opt_stats

Typedef Documentation

Structure for recording known values of a conditional expression
   at the exits from its block.   
typedef struct expr_hash_elt* expr_hash_elt_t
Stack of available expressions in AVAIL_EXPRs.  Each block pushes any
   expressions it enters into the hash table along with a marker entry
   (null).  When we finish processing the block, we pop off entries and
   remove the expressions from the global hash table until we hit the
   marker.   

Enumeration Type Documentation

enum expr_kind
@verbatim SSA Dominator optimizations for trees

Copyright (C) 2001-2013 Free Software Foundation, Inc. Contributed by Diego Novillo dnovi.nosp@m.llo@.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 file implements optimizations on the dominator tree.   
Representation of a "naked" right-hand-side expression, to be used
   in recording available expressions in the expression hash table.   
Enumerator:
EXPR_SINGLE 
EXPR_UNARY 
EXPR_BINARY 
EXPR_TERNARY 
EXPR_CALL 
EXPR_PHI 

Function Documentation

static struct edge_info* allocate_edge_info ( )
staticread
Allocate an EDGE_INFO for edge E and attach it to E.
   Return the new EDGE_INFO structure.   

References edge_def::aux.

Referenced by record_edge_info().

static hashval_t avail_expr_hash ( const void *  )
static
static hashval_t avail_expr_hash ( )
static
Hashing and equality functions for AVAIL_EXPRS.  We compute a value number
   for expressions using the code of the expression and the SSA numbers of
   its operands.   

References expr::expr, gimple_vuse(), iterative_hash_expr(), iterative_hash_hashable_expr(), and expr_hash_elt::stmt.

static void build_and_record_new_cond ( enum tree_code  code,
tree  op0,
tree  op1,
vec< cond_equivalence > *  p 
)
static
Build a cond_equivalence record indicating that the comparison
   CODE holds between operands OP0 and OP1 and push it to **P.   

References hashable_expr::binary, cond_equivalence_s::cond, EXPR_BINARY, hashable_expr::kind, hashable_expr::ops, tcc_comparison, hashable_expr::type, and cond_equivalence_s::value.

Referenced by record_conditions().

static void canonicalize_comparison ( )
static
Given a conditional statement CONDSTMT, convert the
   condition to a canonical form.   

References gimple_cond_code(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_cond_set_code(), gimple_cond_set_lhs(), gimple_cond_set_rhs(), swap_tree_comparison(), tree_swap_operands_p(), and update_stmt().

Referenced by optimize_stmt().

static void cprop_into_stmt ( )
static
CONST_AND_COPIES is a table which maps an SSA_NAME to the current
   known value for that SSA_NAME (or NULL if no value is known).

   Propagate values from CONST_AND_COPIES into the uses, vuses and
   vdef_ops of STMT.   

References cprop_operand().

Referenced by optimize_stmt().

static void cprop_into_successor_phis ( )
static
CONST_AND_COPIES is a table which maps an SSA_NAME to the current
   known value for that SSA_NAME (or NULL if no value is known).

   Propagate values from CONST_AND_COPIES into the PHI nodes of the
   successors of BB.   

References edge_def::dest, edge_def::dest_idx, edge_def::flags, get_use_from_ptr(), gimple_phi_arg_imm_use_ptr(), gsi_end_p(), gsi_next(), gsi_start_phis(), gsi_stmt(), is_gimple_min_invariant(), may_propagate_copy(), hashable_expr::phi, propagate_value(), and basic_block_def::succs.

Referenced by dom_opt_enter_block().

DEBUG_FUNCTION void debug_dominator_optimization_stats ( void  )
Dump SSA statistics on stderr.   

References dump_dominator_optimization_stats().

tree degenerate_phi_result ( )
PHI-ONLY copy and constant propagation.  This pass is meant to clean
   up degenerate PHIs created by or exposed by jump threading.   
Given PHI, return its RHS if the PHI is a degenerate, otherwise return
   NULL.   

References gimple_phi_arg_def(), gimple_phi_num_args(), gimple_phi_result(), expr_hash_elt::lhs, and operand_equal_p().

static void dom_opt_leave_block ( struct dom_walk_data ,
basic_block   
)
static
static void dom_opt_leave_block ( )
static
static void dom_thread_across_edge ( struct dom_walk_data ,
edge   
)
static

Referenced by dom_opt_leave_block().

static void dom_thread_across_edge ( )
static
Wrapper for common code to attempt to thread an edge.  For example,
   it handles lazily building the dummy condition and the bookkeeping
   when jump threading is successful.   

References gimple_build_cond(), dom_walk_data::global_data, simplify_stmt_for_jump_threading(), and thread_across_edge().

void dump_dominator_optimization_stats ( )
static void eliminate_const_or_copy ( )
static
STMT is either a PHI node (potentially a degenerate PHI node) or
   a statement that is a trivial copy or constant initialization.

   Attempt to eliminate T by propagating its RHS into all uses of
   its LHS.  This may in turn set new bits in INTERESTING_NAMES
   for nodes we want to revisit later.

   All exit paths should clear INTERESTING_NAMES for the result
   of STMT.   

References bitmap_clear_bit(), get_lhs_or_phi_result(), get_rhs_or_phi_arg(), has_zero_uses(), expr_hash_elt::lhs, propagate_rhs_into_lhs(), remove_stmt_or_phi(), and virtual_operand_p().

Referenced by eliminate_degenerate_phis(), and eliminate_degenerate_phis_1().

static unsigned int eliminate_degenerate_phis ( )
static
A very simple pass to eliminate degenerate PHI nodes from the
   IL.  This is meant to be fast enough to be able to be run several
   times in the optimization pipeline.

   Certain optimizations, particularly those which duplicate blocks
   or remove edges from the CFG can create or expose PHIs which are
   trivial copies or constant initializations.

   While we could pick up these optimizations in DOM or with the
   combination of copy-prop and CCP, those solutions are far too
   heavy-weight for our needs.

   This implementation has two phases so that we can efficiently
   eliminate the first order degenerate PHIs and second order
   degenerate PHIs.

   The first phase performs a dominator walk to identify and eliminate
   the vast majority of the degenerate PHIs.  When a degenerate PHI
   is identified and eliminated any affected statements or PHIs
   are put on a worklist.

   The second phase eliminates degenerate PHIs and trivial copies
   or constant initializations using the worklist.  This is how we
   pick up the secondary optimization opportunities with minimal
   cost.   

References bitmap_copy(), bitmap_empty_p(), calculate_dominance_info(), CDI_DOMINATORS, cfg_altered, eliminate_const_or_copy(), eliminate_degenerate_phis_1(), free_dominance_info(), gimple_purge_all_dead_eh_edges(), LOOPS_NEED_FIXUP, and loops_state_set().

static void eliminate_degenerate_phis_1 ( )
static
The first phase in degenerate PHI elimination.

   Eliminate the degenerate PHIs in BB, then recurse on the
   dominator children of BB.   

References CDI_DOMINATORS, eliminate_const_or_copy(), first_dom_son(), gsi_end_p(), gsi_next(), gsi_start_phis(), gsi_stmt(), and next_dom_son().

Referenced by eliminate_degenerate_phis().

static void eliminate_redundant_computations ( gimple_stmt_iterator )
static
static void eliminate_redundant_computations ( )
static
static void free_all_edge_infos ( )
static
Free all EDGE_INFO structures associated with edges in the CFG.
   If a particular edge can be threaded, copy the redirection
   target from the EDGE_INFO structure into the edge's AUX field
   as required by code to update the CFG and SSA graph for
   jump threading.   

References edge_def::aux, edge_info::cond_equivalences, free(), and basic_block_def::preds.

Referenced by tree_ssa_dominator_optimize().

static void free_expr_hash_elt ( void *  )
static
static void free_expr_hash_elt ( )
static
Delete an expr_hash_elt and reclaim its storage.   

References free(), and free_expr_hash_elt_contents().

static void free_expr_hash_elt_contents ( )
static
Delete variable sized pieces of the expr_hash_elt ELEMENT.   

References hashable_expr::call, expr_hash_elt::expr, EXPR_CALL, EXPR_PHI, free(), hashable_expr::kind, hashable_expr::ops, and hashable_expr::phi.

Referenced by free_expr_hash_elt(), and lookup_avail_expr().

static bool gate_dominator ( )
static
static tree get_lhs_or_phi_result ( )
static
Given a statement STMT, which is either a PHI node or an assignment,
   return the "lhs" of the node.   

References gimple_assign_lhs(), gimple_phi_result(), and is_gimple_assign().

Referenced by eliminate_const_or_copy(), and propagate_rhs_into_lhs().

static tree get_rhs_or_phi_arg ( )
static
Given a statement STMT, which is either a PHI node or an assignment,
   return the "rhs" of the node, in the case of a non-degenerate
   phi, NULL is returned.   

References degenerate_phi_result(), gimple_assign_rhs1(), and gimple_assign_single_p().

Referenced by eliminate_const_or_copy().

static bool hashable_expr_equal_p ( const struct hashable_expr expr0,
const struct hashable_expr expr1 
)
static
Hashtable helpers.   
Compare two hashable_expr structures for equivalence.
   They are considered equivalent when the the expressions
   they denote must necessarily be equal.  The logic is intended
   to follow that of operand_equal_p in fold-const.c   

References hashable_expr::binary, hashable_expr::call, commutative_ternary_tree_code(), commutative_tree_code(), EXPR_BINARY, EXPR_CALL, EXPR_PHI, EXPR_SINGLE, EXPR_TERNARY, EXPR_UNARY, gimple_call_same_target_p(), hashable_expr::kind, operand_equal_p(), hashable_expr::ops, hashable_expr::phi, hashable_expr::single, hashable_expr::ternary, hashable_expr::type, and hashable_expr::unary.

Referenced by expr_elt_hasher::equal().

static void htab_statistics ( FILE *  ,
hash_table< expr_elt_hasher  
)
static
static void htab_statistics ( )
static
static void initialize_expr_from_cond ( )
static
Given a conditional expression COND as a tree, initialize
   a hashable_expr expression EXPR.  The conditional must be a
   comparison or logical negation.  A constant or a variable is
   not permitted.   

References hashable_expr::binary, EXPR_BINARY, EXPR_UNARY, hashable_expr::kind, hashable_expr::ops, hashable_expr::type, and hashable_expr::unary.

Referenced by record_conditions().

static void initialize_hash_element_from_expr ( struct hashable_expr expr,
tree  lhs,
struct expr_hash_elt element 
)
static
Given a hashable_expr expression EXPR and an LHS,
   initialize the hash table element pointed to by ELEMENT.   

References avail_expr_hash(), expr_hash_elt::expr, expr_hash_elt::hash, expr_hash_elt::lhs, expr_hash_elt::stamp, and expr_hash_elt::stmt.

Referenced by record_cond().

static hashval_t iterative_hash_hashable_expr ( )
static
Compute a hash value for a hashable_expr value EXPR and a
   previously accumulated hash value VAL.  If two hashable_expr
   values compare equal with hashable_expr_equal_p, they must
   hash to the same value, given an identical value of VAL.
   The logic is intended to follow iterative_hash_expr in tree.c.   

References hashable_expr::binary, hashable_expr::call, commutative_ternary_tree_code(), commutative_tree_code(), EXPR_BINARY, EXPR_CALL, EXPR_PHI, EXPR_SINGLE, EXPR_TERNARY, EXPR_UNARY, hashable_expr::fn_from, gimple_call_fn(), gimple_call_internal_fn(), gimple_call_internal_p(), iterative_hash_expr(), iterative_hash_exprs_commutative(), iterative_hash_hashval_t(), hashable_expr::kind, hashable_expr::ops, hashable_expr::phi, hashable_expr::single, hashable_expr::ternary, hashable_expr::type, and hashable_expr::unary.

Referenced by avail_expr_hash().

static tree lookup_avail_expr ( )
static
Search for an existing instance of STMT in the AVAIL_EXPRS table.
   If found, return its LHS. Otherwise insert STMT in the table and
   return NULL_TREE.

   Also, when an expression is first inserted in the  table, it is also
   is also added to AVAIL_EXPRS_STACK, so that it can be removed when
   we finish processing this block and its children.   

References dump_file, dump_flags, expr_hash_elt::expr, EXPR_SINGLE, hash_table< Descriptor, Allocator >::find_slot_with_hash(), free_expr_hash_elt_contents(), gimple_get_lhs(), gimple_phi_result(), expr_hash_elt::hash, initialize_hash_element(), is_gimple_min_invariant(), hashable_expr::kind, edge_info::lhs, expr_hash_elt::lhs, hashable_expr::ops, print_expr_hash_elt(), print_generic_expr(), hashable_expr::single, and expr_hash_elt::stamp.

int loop_depth_of_name ( )
Return the loop depth of the basic block of the defining statement of X.
   This number should not be treated as absolutely correct because the loop
   information may not be completely up-to-date when dom runs.  However, it
   will be relatively correct, and as more passes are taught to keep loop info
   up to date, the result will become more and more accurate.   

References bb_loop_depth(), and gimple_bb().

gimple_opt_pass* make_pass_dominator ( )
gimple_opt_pass* make_pass_phi_only_cprop ( )
static void optimize_stmt ( basic_block  ,
gimple_stmt_iterator   
)
static
Local functions.   

Referenced by dom_opt_enter_block().

static void optimize_stmt ( )
static
Optimize the statement pointed to by iterator SI.

   We try to perform some simplistic global redundancy elimination and
   constant propagation:

   1- To detect global redundancy, we keep track of expressions that have
      been computed in this block and its dominators.  If we find that the
      same expression is computed more than once, we eliminate repeated
      computations by using the target of the first one.

   2- Constant values and copy assignments.  This is used to do very
      simplistic constant and copy propagation.  When a constant or copy
      assignment is found, we map the value on the RHS of the assignment to
      the variable in the LHS in the CONST_AND_COPIES table.   

References bitmap_set_bit(), BUILT_IN_NORMAL, canonicalize_comparison(), cfg_altered, cprop_into_stmt(), dump_file, dump_flags, eliminate_redundant_computations(), find_taken_edge(), fold_binary_loc(), fold_stmt(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_single_p(), gimple_bb(), gimple_call_fndecl(), gimple_call_lhs(), gimple_cond_code(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_goto_dest(), gimple_has_side_effects(), gimple_location(), gimple_modified_p(), gimple_set_modified(), gimple_set_vuse(), gimple_switch_index(), gimple_vuse(), gsi_remove(), gsi_stmt(), basic_block_def::index, is_gimple_assign(), is_gimple_call(), edge_info::lhs, lookup_avail_expr(), maybe_clean_or_replace_eh_stmt(), opt_stats_d::num_stmts, opt_stats, print_gimple_stmt(), propagate_tree_value_into_stmt(), recompute_tree_invariant_for_addr_expr(), record_equivalences_from_stmt(), release_defs(), edge_info::rhs, unlink_stmt_vdef(), and update_stmt_if_modified().

static void propagate_rhs_into_lhs ( )
static
static void record_cond ( cond_equivalence )
static
static void record_cond ( )
static
Enter condition equivalence into the expression hash table.
   This indicates that a conditional expression has a known
   boolean value.   

References cond_equivalence_s::cond, dump_file, dump_flags, hash_table< Descriptor, Allocator >::find_slot_with_hash(), free_expr_hash_elt(), expr_hash_elt::hash, initialize_hash_element_from_expr(), print_expr_hash_elt(), and cond_equivalence_s::value.

static void record_conditions ( )
static
Record that COND is true and INVERTED is false into the edge information
   structure.  Also record that any conditions dominated by COND are true
   as well.

   For example, if a < b is true, then a <= b must also be true.   

References build_and_record_new_cond(), cond_equivalence_s::cond, edge_info::cond_equivalences, initialize_expr_from_cond(), and cond_equivalence_s::value.

Referenced by record_edge_info().

static void record_const_or_copy ( tree  ,
tree   
)
static
static void record_const_or_copy ( )
static
Record that X is equal to Y in const_and_copies.  Record undo
   information in the block-local vector.   

References record_const_or_copy_1().

static void record_const_or_copy_1 ( )
static
A helper function for record_const_or_copy and record_equality.
   Do the work of recording the value and undo info.   

References dump_file, dump_flags, print_generic_expr(), and set_ssa_name_value().

Referenced by record_const_or_copy(), and record_equality().

static void record_equality ( tree  ,
tree   
)
static
static void record_equality ( )
static
Similarly, but assume that X and Y are the two operands of an EQ_EXPR.
   This constrains the cases in which we may treat this as assignment.   

References dconst0, is_gimple_min_invariant(), loop_depth_of_name(), and record_const_or_copy_1().

static void record_equivalences_from_incoming_edge ( basic_block  )
static

Referenced by dom_opt_enter_block().

static void record_equivalences_from_incoming_edge ( )
static
static void record_equivalences_from_phis ( basic_block  )
static

Referenced by dom_opt_enter_block().

static void record_equivalences_from_phis ( )
static
PHI nodes can create equivalences too.

   Ignoring any alternatives which are the same as the result, if
   all the alternatives are equal, then the PHI node creates an
   equivalence.   

References gimple_phi_arg_def(), gimple_phi_num_args(), gimple_phi_result(), gsi_end_p(), gsi_next(), gsi_start_phis(), gsi_stmt(), may_propagate_copy(), operand_equal_for_phi_arg_p(), and set_ssa_name_value().

static void record_equivalences_from_stmt ( gimple  ,
int   
)
static

Referenced by optimize_stmt().

static void record_equivalences_from_stmt ( )
static
STMT, a GIMPLE_ASSIGN, may create certain equivalences, in either
   the available expressions table or the const_and_copies table.
   Detect and record those equivalences.   
We handle only very simple copy equivalences here.  The heavy
   lifing is done by eliminate_redundant_computations.   

References dump_file, dump_flags, gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_single_p(), gimple_has_volatile_ops(), gimple_references_memory_p(), gimple_set_vuse(), gimple_vdef(), is_gimple_assign(), is_gimple_min_invariant(), is_gimple_reg(), edge_info::lhs, lookup_avail_expr(), print_generic_expr(), edge_info::rhs, and set_ssa_name_value().

static void remove_local_expressions_from_table ( )
static
Initialize local stacks for this optimizer and record equivalences
   upon entry to BB.  Equivalences can come from the edge traversed to
   reach BB or they may come from PHI nodes at the start of BB.   
Remove all the expressions in LOCALS from TABLE, stopping when there are
   LIMIT entries left in LOCALs.   

References hash_table< Descriptor, Allocator >::clear_slot(), dump_file, dump_flags, hash_table< Descriptor, Allocator >::find_slot_with_hash(), expr_hash_elt::hash, and print_expr_hash_elt().

Referenced by dom_opt_enter_block(), and dom_opt_leave_block().

static void remove_stmt_or_phi ( )
static
Given a statement STMT, which is either a PHI node or an assignment,
   remove it from the IL.   

References gsi_for_stmt(), gsi_remove(), release_defs(), and remove_phi_node().

Referenced by eliminate_const_or_copy(), and propagate_rhs_into_lhs().

static void restore_vars_to_original_value ( )
static
Use the source/dest pairs in CONST_AND_COPIES_STACK to restore
   CONST_AND_COPIES to its original state, stopping when we hit a
   NULL marker.   

References dump_file, dump_flags, print_generic_expr(), and set_ssa_name_value().

Referenced by dom_opt_leave_block().

bool simple_iv_increment_p ( )
Returns true when STMT is a simple iv increment.  It detects the
   following situation:

   i_1 = phi (..., i_2)
   i_2 = i_1 +/- ...   

References gimple_assign_lhs(), gimple_assign_rhs1(), gimple_assign_rhs_code(), gimple_phi_arg_def(), gimple_phi_num_args(), and hashable_expr::phi.

static tree simplify_stmt_for_jump_threading ( gimple  stmt,
gimple  within_stmt 
)
static
A trivial wrapper so that we can present the generic jump
   threading code with a simple API for simplifying statements.   

References lookup_avail_expr().

Referenced by dom_thread_across_edge().

static edge single_incoming_edge_ignoring_loop_edges ( basic_block  )
static
static edge single_incoming_edge_ignoring_loop_edges ( )
static
Ignoring loop backedges, if BB has precisely one incoming edge then
   return that edge.  Otherwise return NULL.   

References CDI_DOMINATORS, edge_def::dest, dominated_by_p(), basic_block_def::preds, and edge_def::src.


Variable Documentation

hash_table<expr_elt_hasher> avail_exprs
static
Hash table with expressions made available during the renaming process.
   When an assignment of the form X_i = EXPR is found, the statement is
   stored in this table.  If the same expression EXPR is later found on the
   RHS of another statement, it is replaced with X_i (thus performing
   global redundancy elimination).  Similarly as we pass through conditionals
   we record the conditional itself as having either a true or false value
   in this table.   
vec<expr_hash_elt_t> avail_exprs_stack
static
bool cfg_altered
static
Track whether or not we have changed the control flow graph.   

Referenced by eliminate_degenerate_phis(), optimize_stmt(), propagate_rhs_into_lhs(), and tree_ssa_dominator_optimize().

vec<tree> const_and_copies_stack
static
Stack of dest,src pairs that need to be restored during finalization.

   A NULL entry is used to mark the end of pairs which need to be
   restored during finalization of this block.   
bitmap need_eh_cleanup
static
Bitmap of blocks that have had EH statements cleaned.  We should
   remove their dead edges eventually.