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

Go to the source code of this file.

Macros

#define SSA_NAME_VALUE(x)

Functions

void set_ssa_name_value (tree, tree)
void threadedge_initialize_values (void)
void threadedge_finalize_values (void)
bool potentially_threadable_block (basic_block)
void propagate_threaded_block_debug_into (basic_block, basic_block)
void thread_across_edge (gimple, edge, bool, vec< tree > *, tree(*)(gimple, gimple))

Variables

vec< treessa_name_values

Macro Definition Documentation

#define SSA_NAME_VALUE (   x)

Function Documentation

bool potentially_threadable_block ( basic_block  )
void propagate_threaded_block_debug_into ( basic_block  ,
basic_block   
)
void set_ssa_name_value ( tree  ,
tree   
)
void thread_across_edge ( gimple  dummy_cond,
edge  e,
bool  handle_dominating_asserts,
vec< tree > *  stack,
tree(*)(gimple, gimple simplify 
)

We are exiting E->src, see if E->dest ends with a conditional jump which has a known value when reached via E.

Special care is necessary if E is a back edge in the CFG as we may have already recorded equivalences for E->dest into our various tables, including the result of the conditional at the end of E->dest. Threading opportunities are severely limited in that case to avoid short-circuiting the loop incorrectly.

Note it is quite common for the first block inside a loop to end with a conditional which is either always true or always false when reached via the loop backedge. Thus we do not want to blindly disable threading across a loop backedge.

DUMMY_COND is a shared cond_expr used by condition simplification as scratch, to avoid allocating memory.

HANDLE_DOMINATING_ASSERTS is true if we should try to replace operands of the simplified condition with left-hand sides of ASSERT_EXPRs they are used in.

STACK is used to undo temporary equivalences created during the walk of E->dest.

SIMPLIFY is a pass-specific function used to simplify statements.

 There should be no edges on the path, so no need to walk through
 the vector entries.   
We were unable to determine what out edge from E->dest is taken.  However,
we might still be able to thread through successors of E->dest.  This
often occurs when E->dest is a joiner block which then fans back out
based on redundant tests.

If so, we'll copy E->dest and redirect the appropriate predecessor to
the copy.  Within the copy of E->dest, we'll thread one or more edges
to points deeper in the CFG.

This is a stopgap until we have a more structured approach to path
isolation.   


   If E->dest has abnormal outgoing edges, then there's no guarantee
   we can safely redirect any of the edges.  Just punt those cases.   
   Look at each successor of E->dest to see if we can thread through it.   
       Avoid threading to any block we have already visited.   
       Record whether or not we were able to thread through a successor
       of E->dest.   
       If we were able to thread through a successor of E->dest, then
       record the jump threading opportunity.   

Referenced by simplify_cond_using_ranges().

void threadedge_finalize_values ( void  )

Free the per SSA_NAME value-handle array.

References single_pred_p(), and single_succ_p().

void threadedge_initialize_values ( void  )

Initialize the per SSA_NAME value-handles array. Returns it.


Variable Documentation

vec<tree> ssa_name_values

Header file for SSA jump threading. Copyright (C) 2013 Free Software Foundation, Inc.

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/.

Array to record value-handles per SSA_NAME.