osprey-gcc-4.2.0/gcc/tree-scalar-evolution.c File Reference

#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "ggc.h"
#include "tree.h"
#include "real.h"
#include "rtl.h"
#include "basic-block.h"
#include "diagnostic.h"
#include "tree-flow.h"
#include "tree-dump.h"
#include "timevar.h"
#include "cfgloop.h"
#include "tree-chrec.h"
#include "tree-scalar-evolution.h"
#include "tree-pass.h"
#include "flags.h"
#include "params.h"

Include dependency graph for tree-scalar-evolution.c:

Go to the source code of this file.

Data Types

type  scev_info_str
type  chrec_stats

Enumerations

enum  t_bool {
  BOOL_FALSE, BOOL_TRUE, BOOL_FALSE, BOOL_TRUE,
  BOOL_FALSE, BOOL_TRUE, t_false, t_true,
  t_dont_know
}
enum  { INSERT_SUPERLOOP_CHRECS = 1, FOLD_CONVERSIONS = 2 }

Functions/Subroutines

static tree analyze_scalar_evolution_1 (struct loop *, tree, tree)
static tree resolve_mixers (struct loop *, tree)
static struct scev_info_strnew_scev_info_str (tree var)
static hashval_t hash_scev_info (const void *elt)
static int eq_scev_info (const void *e1, const void *e2)
static void del_scev_info (void *e)
static treefind_var_scev_info (tree var)
bool chrec_contains_symbols_defined_in_loop (tree chrec, unsigned loop_nb)
static bool loop_phi_node_p (tree phi)
static tree compute_overall_effect_of_inner_loop (struct loop *loop, tree evolution_fn)
bool chrec_is_positive (tree chrec, bool *value)
static void set_scalar_evolution (tree scalar, tree chrec)
static tree get_scalar_evolution (tree scalar)
static tree add_to_evolution_1 (unsigned loop_nb, tree chrec_before, tree to_add, tree at_stmt)
static tree add_to_evolution (unsigned loop_nb, tree chrec_before, enum tree_code code, tree to_add, tree at_stmt)
static tree set_nb_iterations_in_loop (struct loop *loop, tree res)
static bool analyzable_condition (tree expr)
tree get_loop_exit_condition (struct loop *loop)
static void get_exit_conditions_rec (struct loop *loop, VEC(tree, heap)**exit_conditions)
static void select_loops_exit_conditions (struct loops *loops, VEC(tree, heap)**exit_conditions)
static t_bool follow_ssa_edge (struct loop *loop, tree, tree, tree *, int)
static t_bool follow_ssa_edge_in_rhs (struct loop *loop, tree at_stmt, tree rhs, tree halting_phi, tree *evolution_of_loop, int limit)
static bool backedge_phi_arg_p (tree phi, int i)
static t_bool follow_ssa_edge_in_condition_phi_branch (int i, struct loop *loop, tree condition_phi, tree halting_phi, tree *evolution_of_branch, tree init_cond, int limit)
static t_bool follow_ssa_edge_in_condition_phi (struct loop *loop, tree condition_phi, tree halting_phi, tree *evolution_of_loop, int limit)
static t_bool follow_ssa_edge_inner_loop_phi (struct loop *outer_loop, tree loop_phi_node, tree halting_phi, tree *evolution_of_loop, int limit)
static tree analyze_evolution_in_loop (tree loop_phi_node, tree init_cond)
static tree analyze_initial_condition (tree loop_phi_node)
static tree interpret_loop_phi (struct loop *loop, tree loop_phi_node)
static tree interpret_condition_phi (struct loop *loop, tree condition_phi)
static tree interpret_rhs_modify_expr (struct loop *loop, tree at_stmt, tree opnd1, tree type)
static tree compute_scalar_evolution_in_loop (struct loop *wrto_loop, struct loop *def_loop, tree ev)
static tree fold_used_pointer_cast (tree expr)
static bool pointer_offset_p (tree expr)
static tree fold_used_pointer (tree expr, tree at_stmt)
static bool pointer_used_p (tree ptr)
tree analyze_scalar_evolution (struct loop *loop, tree var)
static tree analyze_scalar_evolution_in_loop (struct loop *wrto_loop, struct loop *use_loop, tree version, bool *folded_casts)
static tree get_instantiated_value (htab_t cache, tree version)
static void set_instantiated_value (htab_t cache, tree version, tree val)
static tree loop_closed_phi_def (tree var)
static tree instantiate_parameters_1 (struct loop *loop, tree chrec, int flags, htab_t cache, int size_expr)
tree instantiate_parameters (struct loop *loop, tree chrec)
tree number_of_iterations_in_loop (struct loop *loop)
static void number_of_iterations_for_all_loops (VEC(tree, heap)**exit_conditions)
static void reset_chrecs_counters (struct chrec_stats *stats)
static void dump_chrecs_stats (FILE *file, struct chrec_stats *stats)
static void gather_chrec_stats (tree chrec, struct chrec_stats *stats)
static void analyze_scalar_evolution_for_all_loop_phi_nodes (VEC(tree, heap)**exit_conditions)
static int gather_stats_on_scev_database_1 (void **slot, void *stats)
void gather_stats_on_scev_database (void)
static void initialize_scalar_evolutions_analyzer (void)
void scev_initialize (struct loops *loops)
void scev_reset (void)
bool simple_iv (struct loop *loop, tree stmt, tree op, affine_iv *iv, bool allow_nonconstant_step)
void scev_analysis (void)
void scev_finalize (void)
static bool expression_expensive_p (tree expr)
unsigned int scev_const_prop (void)

Variables

static unsigned nb_set_scev = 0
static unsigned nb_get_scev = 0
tree chrec_not_analyzed_yet
tree chrec_dont_know
tree chrec_known
static bitmap already_instantiated
static htab_t scalar_evolution_info


Enumeration Type Documentation

anonymous enum

Enumerator:
INSERT_SUPERLOOP_CHRECS 
FOLD_CONVERSIONS 

Definition at line 2128 of file tree-scalar-evolution.c.

enum t_bool

Enumerator:
BOOL_FALSE 
BOOL_TRUE 
BOOL_FALSE 
BOOL_TRUE 
BOOL_FALSE 
BOOL_TRUE 
t_false 
t_true 
t_dont_know 

Definition at line 1030 of file tree-scalar-evolution.c.


Function Documentation

static tree add_to_evolution ( unsigned  loop_nb,
tree  chrec_before,
enum tree_code  code,
tree  to_add,
tree  at_stmt 
) [static]

static tree add_to_evolution_1 ( unsigned  loop_nb,
tree  chrec_before,
tree  to_add,
tree  at_stmt 
) [static]

static bool analyzable_condition ( tree  expr  )  [static]

Definition at line 932 of file tree-scalar-evolution.c.

References SSA_NAME, TREE_CODE, and TREE_OPERAND.

static tree analyze_evolution_in_loop ( tree  loop_phi_node,
tree  init_cond 
) [static]

static tree analyze_initial_condition ( tree  loop_phi_node  )  [static]

tree analyze_scalar_evolution ( struct loop loop,
tree  var 
)

static tree analyze_scalar_evolution_1 ( struct loop loop,
tree  var,
tree  res 
) [static]

static void analyze_scalar_evolution_for_all_loop_phi_nodes ( VEC(tree, heap)**  exit_conditions  )  [static]

static tree analyze_scalar_evolution_in_loop ( struct loop wrto_loop,
struct loop use_loop,
tree  version,
bool folded_casts 
) [static]

static bool backedge_phi_arg_p ( tree  phi,
int  i 
) [static]

Definition at line 1220 of file tree-scalar-evolution.c.

References EDGE_IRREDUCIBLE_LOOP, edge::flags, and PHI_ARG_EDGE.

bool chrec_contains_symbols_defined_in_loop ( tree  chrec,
unsigned  loop_nb 
)

bool chrec_is_positive ( tree  chrec,
bool value 
)

static tree compute_overall_effect_of_inner_loop ( struct loop loop,
tree  evolution_fn 
) [static]

static tree compute_scalar_evolution_in_loop ( struct loop wrto_loop,
struct loop def_loop,
tree  ev 
) [static]

static void del_scev_info ( void e  )  [static]

Definition at line 328 of file tree-scalar-evolution.c.

References free().

static void dump_chrecs_stats ( FILE file,
struct chrec_stats stats 
) [static]

static int eq_scev_info ( const void e1,
const void e2 
) [static]

Definition at line 317 of file tree-scalar-evolution.c.

References scev_info_str::var.

static bool expression_expensive_p ( tree  expr  )  [static]

Definition at line 2874 of file tree-scalar-evolution.c.

References force_expr_to_var_cost(), and target_spill_cost.

Referenced by scev_const_prop().

static tree* find_var_scev_info ( tree  var  )  [static]

static tree fold_used_pointer ( tree  expr,
tree  at_stmt 
) [static]

static tree fold_used_pointer_cast ( tree  expr  )  [static]

static t_bool follow_ssa_edge ( struct loop loop,
tree  def,
tree  halting_phi,
tree evolution_of_loop,
int  limit 
) [static]

static t_bool follow_ssa_edge_in_condition_phi ( struct loop loop,
tree  condition_phi,
tree  halting_phi,
tree evolution_of_loop,
int  limit 
) [static]

static t_bool follow_ssa_edge_in_condition_phi_branch ( int  i,
struct loop loop,
tree  condition_phi,
tree  halting_phi,
tree evolution_of_branch,
tree  init_cond,
int  limit 
) [inline, static]

static t_bool follow_ssa_edge_in_rhs ( struct loop loop,
tree  at_stmt,
tree  rhs,
tree  halting_phi,
tree evolution_of_loop,
int  limit 
) [static]

static t_bool follow_ssa_edge_inner_loop_phi ( struct loop outer_loop,
tree  loop_phi_node,
tree  halting_phi,
tree evolution_of_loop,
int  limit 
) [static]

static void gather_chrec_stats ( tree  chrec,
struct chrec_stats stats 
) [static]

void gather_stats_on_scev_database ( void   ) 

static int gather_stats_on_scev_database_1 ( void **  slot,
void stats 
) [static]

Definition at line 2701 of file tree-scalar-evolution.c.

References scev_info_str::chrec, and gather_chrec_stats().

static void get_exit_conditions_rec ( struct loop loop,
VEC(tree, heap)**  exit_conditions 
) [static]

static tree get_instantiated_value ( htab_t  cache,
tree  version 
) [static]

tree get_loop_exit_condition ( struct loop loop  ) 

static tree get_scalar_evolution ( tree  scalar  )  [static]

static hashval_t hash_scev_info ( const void elt  )  [static]

Definition at line 309 of file tree-scalar-evolution.c.

References SSA_NAME_VERSION, and scev_info_str::var.

static void initialize_scalar_evolutions_analyzer ( void   )  [static]

tree instantiate_parameters ( struct loop loop,
tree  chrec 
)

static tree instantiate_parameters_1 ( struct loop loop,
tree  chrec,
int  flags,
htab_t  cache,
int  size_expr 
) [static]

static tree interpret_condition_phi ( struct loop loop,
tree  condition_phi 
) [static]

static tree interpret_loop_phi ( struct loop loop,
tree  loop_phi_node 
) [static]

static tree interpret_rhs_modify_expr ( struct loop loop,
tree  at_stmt,
tree  opnd1,
tree  type 
) [static]

static tree loop_closed_phi_def ( tree  var  )  [static]

static bool loop_phi_node_p ( tree  phi  )  [static]

Definition at line 414 of file tree-scalar-evolution.c.

References bb_for_stmt(), loop::header, and loop_containing_stmt().

static struct scev_info_str* new_scev_info_str ( tree  var  )  [static, read]

static void number_of_iterations_for_all_loops ( VEC(tree, heap)**  exit_conditions  )  [static]

tree number_of_iterations_in_loop ( struct loop loop  ) 

static bool pointer_offset_p ( tree  expr  )  [static]

Definition at line 1753 of file tree-scalar-evolution.c.

References INTEGRAL_TYPE_P, TREE_CODE, TREE_OPERAND, and TREE_TYPE.

Referenced by fold_used_pointer().

static bool pointer_used_p ( tree  ptr  )  [static]

static void reset_chrecs_counters ( struct chrec_stats stats  )  [inline, static]

static tree resolve_mixers ( struct loop loop,
tree  chrec 
) [static]

void scev_analysis ( void   ) 

unsigned int scev_const_prop ( void   ) 

void scev_finalize ( void   ) 

void scev_initialize ( struct loops loops  ) 

void scev_reset ( void   ) 

static void select_loops_exit_conditions ( struct loops loops,
VEC(tree, heap)**  exit_conditions 
) [static]

Definition at line 1019 of file tree-scalar-evolution.c.

References get_exit_conditions_rec(), loop::inner, and loops::parray.

static void set_instantiated_value ( htab_t  cache,
tree  version,
tree  val 
) [static]

static tree set_nb_iterations_in_loop ( struct loop loop,
tree  res 
) [inline, static]

static void set_scalar_evolution ( tree  scalar,
tree  chrec 
) [static]

bool simple_iv ( struct loop loop,
tree  stmt,
tree  op,
affine_iv iv,
bool  allow_nonconstant_step 
)


Variable Documentation

Definition at line 287 of file tree-scalar-evolution.c.

Definition at line 281 of file tree-scalar-evolution.c.

Definition at line 285 of file tree-scalar-evolution.c.

unsigned nb_get_scev = 0 [static]

Definition at line 270 of file tree-scalar-evolution.c.

unsigned nb_set_scev = 0 [static]

Definition at line 269 of file tree-scalar-evolution.c.

Definition at line 289 of file tree-scalar-evolution.c.


Generated on Wed Apr 8 14:22:36 2009 for Open64 by  doxygen 1.5.6