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

Data Structures

struct  vn_nary_op_hasher
struct  vn_phi_hasher
struct  vn_reference_hasher
struct  vn_tables_s
struct  vn_constant_hasher

Typedefs

typedef hash_table
< vn_nary_op_hasher
vn_nary_op_table_type
typedef
vn_nary_op_table_type::iterator 
vn_nary_op_iterator_type
typedef hash_table< vn_phi_hashervn_phi_table_type
typedef vn_phi_table_type::iterator vn_phi_iterator_type
typedef hash_table
< vn_reference_hasher
vn_reference_table_type
typedef
vn_reference_table_type::iterator 
vn_reference_iterator_type
typedef struct vn_tables_svn_tables_t

Functions

static int vn_phi_eq (const_vn_phi_t const vp1, const_vn_phi_t const vp2)
static int vn_reference_op_eq ()
static void free_reference ()
vn_ssa_aux_t VN_INFO ()
static void VN_INFO_SET ()
vn_ssa_aux_t VN_INFO_GET ()
tree vn_get_expr_for ()
enum vn_kind vn_get_stmt_kind ()
unsigned int get_constant_value_id ()
unsigned int get_or_alloc_constant_value_id ()
bool value_id_constant_p ()
static hashval_t vn_reference_op_compute_hash ()
hashval_t vn_reference_compute_hash ()
bool vn_reference_eq ()
void copy_reference_ops_from_ref ()
bool ao_ref_init_from_vn_reference (ao_ref *ref, alias_set_type set, tree type, vec< vn_reference_op_s > ops)
void copy_reference_ops_from_call (gimple call, vec< vn_reference_op_s > *result)
static vec< vn_reference_op_screate_reference_ops_from_call ()
void vn_reference_fold_indirect (vec< vn_reference_op_s > *ops, unsigned int *i_p)
static void vn_reference_maybe_forwprop_address (vec< vn_reference_op_s > *ops, unsigned int *i_p)
tree fully_constant_vn_reference_p ()
static vec< vn_reference_op_svalueize_refs_1 ()
static vec< vn_reference_op_svalueize_refs ()
static vec< vn_reference_op_svalueize_shared_reference_ops_from_ref ()
static vec< vn_reference_op_svalueize_shared_reference_ops_from_call ()
static tree vn_reference_lookup_1 ()
static void * vn_reference_lookup_2 (ao_ref *op, tree vuse, unsigned int cnt, void *vr_)
static vn_reference_t vn_reference_lookup_or_insert_for_pieces (tree vuse, alias_set_type set, tree type, vec< vn_reference_op_s, va_heap > operands, tree value)
static void * vn_reference_lookup_3 ()
tree vn_reference_lookup_pieces (tree vuse, alias_set_type set, tree type, vec< vn_reference_op_s > operands, vn_reference_t *vnresult, vn_lookup_kind kind)
tree vn_reference_lookup (tree op, tree vuse, vn_lookup_kind kind, vn_reference_t *vnresult)
vn_reference_t vn_reference_insert ()
vn_reference_t vn_reference_insert_pieces (tree vuse, alias_set_type set, tree type, vec< vn_reference_op_s > operands, tree result, unsigned int value_id)
hashval_t vn_nary_op_compute_hash ()
bool vn_nary_op_eq ()
static void init_vn_nary_op_from_pieces (vn_nary_op_t vno, unsigned int length, enum tree_code code, tree type, tree *ops)
static void init_vn_nary_op_from_op ()
static unsigned int vn_nary_length_from_stmt ()
static void init_vn_nary_op_from_stmt ()
static tree vn_nary_op_lookup_1 ()
tree vn_nary_op_lookup_pieces (unsigned int length, enum tree_code code, tree type, tree *ops, vn_nary_op_t *vnresult)
tree vn_nary_op_lookup ()
tree vn_nary_op_lookup_stmt ()
static vn_nary_op_t alloc_vn_nary_op_noinit ()
static vn_nary_op_t alloc_vn_nary_op ()
static vn_nary_op_t vn_nary_op_insert_into (vn_nary_op_t vno, vn_nary_op_table_type table, bool compute_hash)
vn_nary_op_t vn_nary_op_insert_pieces (unsigned int length, enum tree_code code, tree type, tree *ops, tree result, unsigned int value_id)
vn_nary_op_t vn_nary_op_insert ()
vn_nary_op_t vn_nary_op_insert_stmt ()
static hashval_t vn_phi_compute_hash ()
static int vn_phi_eq ()
static tree vn_phi_lookup ()
static vn_phi_t vn_phi_insert ()
static void print_scc ()
static bool set_ssa_val_to ()
static void mark_use_processed ()
static bool defs_to_varying ()
static bool expr_has_constants (tree expr)
static tree valueize_expr (tree expr)
static bool visit_copy ()
static bool visit_nary_op ()
static bool visit_reference_op_call ()
static bool visit_reference_op_load ()
static bool visit_reference_op_store ()
static bool visit_phi ()
static bool expr_has_constants ()
static bool stmt_has_constants ()
static tree valueize_expr ()
static tree simplify_binary_expression ()
static tree simplify_unary_expression ()
static tree try_to_simplify ()
static bool visit_use ()
static int compare_ops ()
static void sort_scc ()
static void copy_nary ()
static void copy_phi ()
static void copy_reference ()
static void process_scc ()
static bool extract_and_process_scc_for_name ()
static bool DFS ()
static void allocate_vn_table ()
static void free_vn_table ()
static void init_scc_vn ()
void free_scc_vn ()
static void set_value_id_for_result ()
static void set_hashtable_value_ids ()
bool run_scc_vn ()
unsigned int get_max_value_id ()
unsigned int get_next_value_id ()
bool expressions_equal_p ()
bool vn_nary_may_trap ()

Variables

static hash_table
< vn_constant_hasher
constant_to_value_id
static bitmap constant_value_ids
static vn_tables_t valid_info
static vn_tables_t optimistic_info
static vn_tables_t current_info
static int * rpo_numbers
tree VN_TOP
static unsigned int next_value_id
static unsigned int next_dfs_num
static vec< treesccstack
static vec< vn_ssa_aux_tvn_ssa_aux_table
static struct obstack vn_ssa_aux_obstack
static vec< vn_reference_op_sshared_lookup_references
static treelast_vuse_ptr
static vn_lookup_kind vn_walk_kind
static vn_lookup_kind default_vn_walk_kind
static vec< treeshared_lookup_phiargs

Typedef Documentation

typedef vn_nary_op_table_type::iterator vn_nary_op_iterator_type
typedef vn_phi_table_type::iterator vn_phi_iterator_type
typedef vn_reference_table_type::iterator vn_reference_iterator_type
typedef struct vn_tables_s * vn_tables_t
The set of hashtables and alloc_pool's for their items.   

Function Documentation

static vn_nary_op_t alloc_vn_nary_op_noinit ( )
static
Allocate a vn_nary_op_t with LENGTH operands on STACK.   

References sizeof_vn_nary_op().

Referenced by alloc_vn_nary_op(), and copy_nary().

static int compare_ops ( )
static
Compare two operands by reverse postorder index  

References gimple_bb(), gimple_nop_p(), gimple_uid(), basic_block_def::index, and rpo_numbers.

Referenced by sort_scc().

static void copy_nary ( )
static
Insert the no longer used nary ONARY to the hash INFO.   

References alloc_vn_nary_op_noinit(), vn_nary_op_s::length, memcpy(), vn_tables_s::nary, vn_tables_s::nary_obstack, sizeof_vn_nary_op(), and vn_nary_op_insert_into().

Referenced by process_scc().

static void copy_phi ( )
static
static void copy_reference ( )
static
static vec<vn_reference_op_s> create_reference_ops_from_call ( )
static
Create a vector of vn_reference_op_s structures from CALL, a
   call statement.  The vector is not shared.   

References copy_reference_ops_from_call(), and vNULL.

Referenced by visit_reference_op_call().

static bool defs_to_varying ( )
static
Set all definitions in STMT to value number to themselves.
   Return true if a value number changed.  

References changed, and set_ssa_val_to().

Referenced by visit_use().

static bool DFS ( )
static
Depth first search on NAME to discover and process SCC's in the SSA
   graph.
   Execution of this algorithm relies on the fact that the SCC's are
   popped off the stack in topological order.
   Returns true if successful, false if we stopped processing SCC's due
   to resource constraints.   

References clear_and_done_ssa_iter(), vn_ssa_aux::dfsnum, extract_and_process_scc_for_name(), gimple_nop_p(), vn_ssa_aux::low, memcpy(), next_dfs_num, vn_ssa_aux::on_sccstack, op_iter_done(), op_iter_init_phiuse(), op_iter_init_use(), op_iter_next_use(), vn_ssa_aux::visited, visited, VN_INFO(), and vNULL.

Referenced by run_scc_vn().

static bool expr_has_constants ( tree  expr)
static
static bool expr_has_constants ( )
static
Return true if EXPR contains constants.   

References is_gimple_min_invariant(), tcc_binary, tcc_declaration, tcc_reference, and tcc_unary.

bool expressions_equal_p ( )
Compare two expressions E1 and E2 and return true if they are equal.   

References OEP_PURE_SAME, and operand_equal_p().

Referenced by visit_phi(), visit_reference_op_store(), vn_constant_eq_with_type(), vn_nary_op_eq(), vn_phi_eq(), vn_reference_eq(), and vn_reference_op_eq().

static bool extract_and_process_scc_for_name ( )
static
Pop the components of the found SCC for NAME off the SCC stack
   and process them.  Returns true if all went well, false if
   we run into resource limits.   

References dump_file, dump_flags, vn_ssa_aux::on_sccstack, print_scc(), process_scc(), sort_scc(), VN_INFO(), and vNULL.

Referenced by DFS().

static void free_reference ( )
inlinestatic
unsigned int get_constant_value_id ( )
Lookup a value id for CONSTANT and return it.  If it does not
   exist returns 0.   

References vn_constant_s::constant, hash_table< Descriptor, Allocator >::find_slot_with_hash(), vn_constant_s::hashcode, vn_constant_s::value_id, and vn_hash_constant_with_type().

Referenced by get_expr_value_id().

unsigned int get_max_value_id ( void  )
Return the maximum value id we have ever seen.   

References next_value_id.

Referenced by init_pre(), and phi_translate_1().

unsigned int get_next_value_id ( void  )
unsigned int get_or_alloc_constant_value_id ( )
static void init_vn_nary_op_from_op ( )
static
Initialize VNO from OP.   

References vn_nary_op_s::length, vn_nary_op_s::op, and vn_nary_op_s::type.

Referenced by vn_nary_op_insert(), and vn_nary_op_lookup().

static void init_vn_nary_op_from_pieces ( vn_nary_op_t  vno,
unsigned int  length,
enum tree_code  code,
tree  type,
tree ops 
)
static
Initialize VNO from the pieces provided.   

References vn_nary_op_s::length, memcpy(), vn_nary_op_s::op, vn_nary_op_s::type, and type().

Referenced by vn_nary_op_insert_pieces(), and vn_nary_op_lookup_pieces().

static void mark_use_processed ( )
static
Mark as processed all the definitions in the defining stmt of USE, or
   the USE itself.   

References vn_ssa_aux::use_processed, and VN_INFO().

Referenced by visit_use().

static void print_scc ( )
static
Print set of components in strongly connected component SCC to OUT.  

References print_generic_expr().

Referenced by extract_and_process_scc_for_name().

bool run_scc_vn ( )
Do SCCVN.  Returns true if it finished, false if we bailed out
   due to resource constraints.  DEFAULT_VN_WALK_KIND_ specifies
   how we use the alias oracle walking during the VN process.   

References cfun, current_function_decl, default_vn_walk_kind, DFS(), dump_file, dump_flags, free_scc_vn(), get_next_value_id(), get_or_alloc_constant_value_id(), has_zero_uses(), init_scc_vn(), is_gimple_min_invariant(), print_generic_expr(), set_hashtable_value_ids(), ssa_default_def(), valid_info, vn_ssa_aux::valnum, vn_ssa_aux::value_id, visited, VN_INFO(), and VN_TOP.

Referenced by do_pre(), and execute_fre().

static void set_value_id_for_result ( )
static
static tree simplify_unary_expression ( )
static
static void sort_scc ( )
static
Sort an array containing members of a strongly connected component
   SCC so that the members are ordered by RPO number.
   This means that when the sort is complete, iterating through the
   array will give you the members in RPO order.   

References compare_ops().

Referenced by extract_and_process_scc_for_name().

static tree try_to_simplify ( )
static
static tree valueize_expr ( tree  expr)
static
static tree valueize_expr ( )
static
Replace SSA_NAMES in expr with their value numbers, and return the
   result.
   This is performed in place.  

References tcc_binary, tcc_unary, and vn_valueize().

static vec<vn_reference_op_s> valueize_refs_1 ( )
static
Transform any SSA_NAME's in a vector of vn_reference_op_s
   structures into their value numbers.  This is done in-place, and
   the vector passed in is returned.  *VALUEIZED_ANYTHING will specify
   whether any operands were valueized.   

References double_int::fits_shwi(), double_int::low, vn_reference_op_struct::off, vn_reference_op_struct::op0, vn_reference_op_struct::op1, vn_reference_op_struct::op2, vn_reference_op_struct::opcode, tree_to_double_int(), vn_reference_fold_indirect(), and vn_reference_maybe_forwprop_address().

Referenced by valueize_refs(), valueize_shared_reference_ops_from_ref(), and vn_reference_lookup_3().

static vec<vn_reference_op_s> valueize_shared_reference_ops_from_call ( )
static
Create a vector of vn_reference_op_s structures from CALL, a
   call statement.  The vector is shared among all callers of
   this function.   

References copy_reference_ops_from_call(), shared_lookup_references, valueize_refs(), and vNULL.

Referenced by visit_reference_op_call().

static vec<vn_reference_op_s> valueize_shared_reference_ops_from_ref ( )
static
Create a vector of vn_reference_op_s structures from REF, a
   REFERENCE_CLASS_P tree.  The vector is shared among all callers of
   this function.  *VALUEIZED_ANYTHING will specify whether any
   operands were valueized.   

References copy_reference_ops_from_ref(), shared_lookup_references, valueize_refs_1(), and vNULL.

Referenced by vn_reference_insert(), and vn_reference_lookup().

static bool visit_copy ( )
static
Visit a copy between LHS and RHS, return true if the value number
   changed.   

References vn_ssa_aux::expr, vn_ssa_aux::has_constants, set_ssa_val_to(), and VN_INFO().

Referenced by visit_phi(), and visit_use().

static bool visit_nary_op ( )
static
Visit a nary operator RHS, value number it, and return true if the
   value number of LHS has changed as a result.   

References changed, vn_phi_s::result, set_ssa_val_to(), vn_nary_op_insert_stmt(), and vn_nary_op_lookup_stmt().

Referenced by visit_use().

static bool visit_phi ( )
static
static bool visit_reference_op_store ( )
static
Visit a store to a reference operator LHS, part of STMT, value number it,
   and return true if the value number of the LHS has changed as a result.   

References changed, dump_file, dump_flags, expressions_equal_p(), gimple_vdef(), gimple_vuse(), is_gimple_min_invariant(), is_gimple_reg(), print_generic_expr(), vn_reference_s::result, vn_reference_s::result_vdef, set_ssa_val_to(), vn_ssa_aux::use_processed, VN_INFO(), VN_NOWALK, vn_reference_insert(), vn_reference_lookup(), and vn_reference_s::vuse.

Referenced by visit_use().

tree vn_get_expr_for ( )
Get the representative expression for the SSA_NAME NAME.  Returns
   the representative SSA_NAME if there is no expression associated with it.   

References vn_ssa_aux::expr, gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), gimple_expr_type(), is_gimple_assign(), tcc_binary, tcc_exceptional, tcc_reference, tcc_unary, vn_ssa_aux::valnum, VN_INFO(), and VN_TOP.

Referenced by eliminate_insert(), simplify_binary_expression(), simplify_unary_expression(), and visit_reference_op_load().

vn_ssa_aux_t VN_INFO_GET ( )
Initialize the value numbering info for a given SSA name.
   This should be called just once for every SSA name.   

References memset(), and vn_ssa_aux_obstack.

Referenced by create_expression_by_pieces(), do_regular_insertion(), eliminate_insert(), get_representative_for(), init_scc_vn(), insert_into_preds_of_block(), and visit_reference_op_load().

static void VN_INFO_SET ( )
inlinestatic
Set the value numbering info for a given SSA name to a given
   value.   
static unsigned int vn_nary_length_from_stmt ( )
static
Return the number of operands for a vn_nary ops structure from STMT.   

References gimple_assign_rhs1(), gimple_assign_rhs_code(), and gimple_num_ops().

Referenced by vn_nary_op_insert_stmt(), and vn_nary_op_lookup_stmt().

bool vn_nary_may_trap ( )
Return true if the nary operation NARY may trap.  This is a copy
   of stmt_could_throw_1_p adjusted to the SCCVN IL.   

References vn_nary_op_s::length, vn_nary_op_s::op, operation_could_trap_helper_p(), tcc_binary, tcc_comparison, tcc_unary, tree_could_trap_p(), vn_nary_op_s::type, and type().

Referenced by compute_avail(), and prune_clobbered_mems().

hashval_t vn_nary_op_compute_hash ( )
bool vn_nary_op_eq ( )
Compare nary operations VNO1 and VNO2 and return true if they are
   equivalent.   

References expressions_equal_p(), vn_nary_op_s::hashcode, vn_nary_op_s::length, vn_nary_op_s::op, vn_nary_op_s::type, and types_compatible_p().

Referenced by vn_nary_op_hasher::equal(), and pre_expr_d::equal().

vn_nary_op_t vn_nary_op_insert ( )
Insert OP into the current hash table with a value number of
   RESULT.  Return the vn_nary_op_t structure we created and put in
   the hashtable.   

References alloc_vn_nary_op(), init_vn_nary_op_from_op(), vn_tables_s::nary, vn_reference_s::value_id, VN_INFO(), and vn_nary_op_insert_into().

Referenced by visit_reference_op_load().

static vn_nary_op_t vn_nary_op_insert_into ( vn_nary_op_t  vno,
vn_nary_op_table_type  table,
bool  compute_hash 
)
static
Insert VNO into TABLE.  If COMPUTE_HASH is true, then compute
   VNO->HASHCODE first.   

References hash_table< Descriptor, Allocator >::find_slot_with_hash(), vn_nary_op_s::hashcode, and vn_nary_op_compute_hash().

Referenced by copy_nary(), vn_nary_op_insert(), vn_nary_op_insert_pieces(), and vn_nary_op_insert_stmt().

vn_nary_op_t vn_nary_op_insert_pieces ( unsigned int  length,
enum tree_code  code,
tree  type,
tree ops,
tree  result,
unsigned int  value_id 
)
Insert a n-ary operation into the current hash table using it's
   pieces.  Return the vn_nary_op_t structure we created and put in
   the hashtable.   

References alloc_vn_nary_op(), init_vn_nary_op_from_pieces(), vn_tables_s::nary, and vn_nary_op_insert_into().

Referenced by phi_translate_1().

vn_nary_op_t vn_nary_op_insert_stmt ( )
Insert the rhs of STMT into the current hash table with a value number of
   RESULT.   

References alloc_vn_nary_op(), init_vn_nary_op_from_stmt(), vn_tables_s::nary, vn_reference_s::value_id, VN_INFO(), vn_nary_length_from_stmt(), and vn_nary_op_insert_into().

Referenced by visit_nary_op().

tree vn_nary_op_lookup ( )
Lookup OP in the current hash table, and return the resulting value
   number if it exists in the hash table.  Return NULL_TREE if it does
   not exist in the hash table or if the result field of the operation
   is NULL. VNRESULT will contain the vn_nary_op_t from the hashtable
   if it exists.   

References init_vn_nary_op_from_op(), sizeof_vn_nary_op(), and vn_nary_op_lookup_1().

Referenced by get_or_alloc_expr_for(), visit_reference_op_load(), and visit_use().

static tree vn_nary_op_lookup_1 ( )
static
Compute the hashcode for VNO and look for it in the hash table;
   return the resulting value number if it exists in the hash table.
   Return NULL_TREE if it does not exist in the hash table or if the
   result field of the operation is NULL.  VNRESULT will contain the
   vn_nary_op_t from the hashtable if it exists.   

References hash_table< Descriptor, Allocator >::find_slot_with_hash(), vn_nary_op_s::hashcode, vn_tables_s::nary, vn_nary_op_s::result, and vn_nary_op_compute_hash().

Referenced by vn_nary_op_lookup(), vn_nary_op_lookup_pieces(), and vn_nary_op_lookup_stmt().

tree vn_nary_op_lookup_pieces ( unsigned int  length,
enum tree_code  code,
tree  type,
tree ops,
vn_nary_op_t vnresult 
)
Lookup a n-ary operation by its pieces and return the resulting value
   number if it exists in the hash table.  Return NULL_TREE if it does
   not exist in the hash table or if the result field of the operation
   is NULL. VNRESULT will contain the vn_nary_op_t from the hashtable
   if it exists.   

References init_vn_nary_op_from_pieces(), sizeof_vn_nary_op(), and vn_nary_op_lookup_1().

Referenced by phi_translate_1().

tree vn_nary_op_lookup_stmt ( )
Lookup the rhs of STMT in the current hash table, and return the resulting
   value number if it exists in the hash table.  Return NULL_TREE if
   it does not exist in the hash table.  VNRESULT will contain the
   vn_nary_op_t from the hashtable if it exists.   

References init_vn_nary_op_from_stmt(), sizeof_vn_nary_op(), vn_nary_length_from_stmt(), and vn_nary_op_lookup_1().

Referenced by compute_avail(), and visit_nary_op().

static hashval_t vn_phi_compute_hash ( )
inlinestatic
Compute a hashcode for PHI operation VP1 and return it.   

References vn_phi_s::block, basic_block_def::index, iterative_hash_expr(), vn_phi_s::phiargs, vn_reference_s::result, vn_phi_s::type, type(), vn_hash_type(), and VN_TOP.

Referenced by vn_phi_insert(), and vn_phi_lookup().

static int vn_phi_eq ( const_vn_phi_t const  vp1,
const_vn_phi_t const  vp2 
)
static
vn_phi hashtable helpers.   

Referenced by vn_phi_hasher::equal().

static int vn_phi_eq ( )
static
Compare two phi entries for equality, ignoring VN_TOP arguments.   

References vn_phi_s::block, expressions_equal_p(), vn_phi_s::hashcode, vn_phi_s::phiargs, vn_phi_s::type, types_compatible_p(), and VN_TOP.

static tree vn_phi_lookup ( )
static
Lookup PHI in the current hash table, and return the resulting
   value number if it exists in the hash table.  Return NULL_TREE if
   it does not exist in the hash table.  

References vn_phi_s::block, hash_table< Descriptor, Allocator >::find_slot_with_hash(), gimple_bb(), gimple_phi_num_args(), gimple_phi_result(), vn_phi_s::hashcode, vn_phi_s::phiargs, vn_tables_s::phis, vn_phi_s::result, shared_lookup_phiargs, vn_phi_s::type, and vn_phi_compute_hash().

Referenced by visit_phi().

bool vn_reference_eq ( )
void vn_reference_fold_indirect ( vec< vn_reference_op_s > *  ops,
unsigned int *  i_p 
)
Fold *& at position *I_P in a vn_reference_op_s vector *OPS.  Updates
   *I_P to point to the last element of the replacement.   

References double_int_to_tree(), double_int::from_shwi(), get_addr_base_and_unit_offset(), host_integerp(), HOST_WIDE_INT, vn_reference_op_struct::off, vn_reference_op_struct::op0, double_int::sext(), and tree_to_double_int().

Referenced by phi_translate_1(), valueize_refs_1(), and vn_reference_maybe_forwprop_address().

vn_reference_t vn_reference_insert_pieces ( tree  vuse,
alias_set_type  set,
tree  type,
vec< vn_reference_op_s operands,
tree  result,
unsigned int  value_id 
)
tree vn_reference_lookup ( tree  op,
tree  vuse,
vn_lookup_kind  kind,
vn_reference_t vnresult 
)
Lookup OP in the current hash table, and return the resulting value
   number if it exists in the hash table.  Return NULL_TREE if it does
   not exist in the hash table or if the result field of the structure
   was NULL..  VNRESULT will be filled in with the vn_reference_t
   stored in the hashtable if one exists.   

References ao_ref_init(), ao_ref_init_from_vn_reference(), fully_constant_vn_reference_p(), get_alias_set(), vn_reference_s::hashcode, vn_reference_s::operands, vn_reference_s::result, vn_reference_s::set, vn_reference_s::type, valueize_shared_reference_ops_from_ref(), VN_NOWALK, vn_reference_compute_hash(), vn_reference_lookup_1(), vn_reference_lookup_2(), vn_reference_lookup_3(), vn_walk_kind, vn_reference_s::vuse, and walk_non_aliased_vuses().

Referenced by compute_avail(), eliminate_bb(), visit_reference_op_load(), and visit_reference_op_store().

static tree vn_reference_lookup_1 ( )
static
Lookup a SCCVN reference operation VR in the current hash table.
   Returns the resulting value number if it exists in the hash table,
   NULL_TREE otherwise.  VNRESULT will be filled in with the actual
   vn_reference_t stored in the hashtable if something is found.   

References hash_table< Descriptor, Allocator >::find_slot_with_hash(), vn_reference_s::hashcode, and vn_tables_s::references.

Referenced by visit_reference_op_call(), vn_reference_lookup(), vn_reference_lookup_or_insert_for_pieces(), and vn_reference_lookup_pieces().

static void* vn_reference_lookup_2 ( ao_ref op,
tree  vuse,
unsigned int  cnt,
void *  vr_ 
)
static
Callback for walk_non_aliased_vuses.  Adjusts the vn_reference_t VR_
   with the current VUSE and performs the expression lookup.   

References hash_table< Descriptor, Allocator >::find_slot_with_hash(), vn_reference_s::hashcode, last_vuse_ptr, vn_tables_s::references, and vn_reference_s::vuse.

Referenced by vn_reference_lookup(), and vn_reference_lookup_pieces().

static vn_reference_t vn_reference_lookup_or_insert_for_pieces ( tree  vuse,
alias_set_type  set,
tree  type,
vec< vn_reference_op_s, va_heap operands,
tree  value 
)
static
Lookup an existing or insert a new vn_reference entry into the
   value table for the VUSE, SET, TYPE, OPERANDS reference which
   has the value VALUE which is either a constant or an SSA name.   

References get_or_alloc_constant_value_id(), vn_reference_s::hashcode, vn_reference_s::operands, vn_reference_s::result, vn_reference_s::set, vn_reference_s::type, type(), vn_reference_s::value_id, vn_ssa_aux::value_id, VN_INFO(), vn_reference_compute_hash(), vn_reference_insert_pieces(), vn_reference_lookup_1(), and vn_reference_s::vuse.

Referenced by vn_reference_lookup_3().

tree vn_reference_lookup_pieces ( tree  vuse,
alias_set_type  set,
tree  type,
vec< vn_reference_op_s operands,
vn_reference_t vnresult,
vn_lookup_kind  kind 
)
Lookup a reference operation by it's parts, in the current hash table.
   Returns the resulting value number if it exists in the hash table,
   NULL_TREE otherwise.  VNRESULT will be filled in with the actual
   vn_reference_t stored in the hashtable if something is found.   

References ao_ref_init_from_vn_reference(), fully_constant_vn_reference_p(), vn_reference_s::hashcode, memcpy(), vn_reference_s::operands, vn_reference_s::set, vn_reference_s::type, type(), valueize_refs(), VN_NOWALK, vn_reference_compute_hash(), vn_reference_lookup_1(), vn_reference_lookup_2(), vn_reference_lookup_3(), vn_walk_kind, vn_reference_s::vuse, and walk_non_aliased_vuses().

Referenced by compute_avail(), and phi_translate_1().

static void vn_reference_maybe_forwprop_address ( vec< vn_reference_op_s > *  ops,
unsigned int *  i_p 
)
static
static hashval_t vn_reference_op_compute_hash ( )
static
static int vn_reference_op_eq ( )
static
Compare two reference operands P1 and P2 for equality.  Return true if
   they are equal, and false otherwise.   

References expressions_equal_p(), vn_reference_op_struct::op0, vn_reference_op_struct::op1, vn_reference_op_struct::op2, vn_reference_op_struct::opcode, vn_reference_op_struct::type, and types_compatible_p().

Referenced by vn_reference_eq(), and vn_reference_lookup_3().


Variable Documentation

hash_table<vn_constant_hasher> constant_to_value_id
static
bitmap constant_value_ids
static
vn_tables_t current_info
static
Pointer to the set of hashtables that is currently being used.
   Should always point to either the optimistic_info, or the
   valid_info.   
vn_lookup_kind default_vn_walk_kind
static
unsigned int next_dfs_num
static
Next DFS number and the stack for strongly connected component
   detection.  

Referenced by DFS(), and init_scc_vn().

unsigned int next_value_id
static
Unique counter for our value ids.   

Referenced by get_max_value_id(), get_next_value_id(), and init_scc_vn().

vn_tables_t optimistic_info
static
Optimistic hashtables storing information we are making assumptions about
   during iterations.   

Referenced by process_scc(), and visit_reference_op_load().

int* rpo_numbers
static
Reverse post order index for each basic block.   

Referenced by compare_ops(), free_scc_vn(), and init_scc_vn().

vec<tree> sccstack
static
vec<tree> shared_lookup_phiargs
static

Referenced by vn_phi_lookup().

vn_tables_t valid_info
static
Valid hashtables storing information we have proven to be
   correct.   

Referenced by process_scc(), run_scc_vn(), and visit_reference_op_load().

struct obstack vn_ssa_aux_obstack
static
vec<vn_ssa_aux_t> vn_ssa_aux_table
static
Table of vn_ssa_aux_t's, one per ssa_name.  The vn_ssa_aux_t objects
   are allocated on an obstack for locality reasons, and to free them
   without looping over the vec.   
tree VN_TOP
This represents the top of the VN lattice, which is the universal
   value.   

Referenced by eliminate_bb(), init_scc_vn(), run_scc_vn(), set_ssa_val_to(), visit_phi(), vn_get_expr_for(), vn_phi_compute_hash(), vn_phi_eq(), and vn_valueize().