OSDN Git Service

gcc/testsuite/
[pf3gnuchains/gcc-fork.git] / gcc / tree-flow.h
index 1b63e95..03d1ba5 100644 (file)
@@ -40,6 +40,25 @@ typedef struct basic_block_def *basic_block;
 #endif
 struct static_var_ann_d;
 
+/* The reasons a variable may escape a function.  */
+enum escape_type 
+{
+  NO_ESCAPE = 0,                       /* Doesn't escape.  */
+  ESCAPE_STORED_IN_GLOBAL = 1 << 0,
+  ESCAPE_TO_ASM = 1 << 1,              /* Passed by address to an assembly
+                                          statement.  */
+  ESCAPE_TO_CALL = 1 << 2,             /* Escapes to a function call.  */
+  ESCAPE_BAD_CAST = 1 << 3,            /* Cast from pointer to integer */
+  ESCAPE_TO_RETURN = 1 << 4,           /* Returned from function.  */
+  ESCAPE_TO_PURE_CONST = 1 << 5,       /* Escapes to a pure or constant
+                                          function call.  */
+  ESCAPE_IS_GLOBAL = 1 << 6,           /* Is a global variable.  */
+  ESCAPE_IS_PARM = 1 << 7,             /* Is an incoming function argument.  */
+  ESCAPE_UNKNOWN = 1 << 8              /* We believe it escapes for
+                                          some reason not enumerated
+                                          above.  */
+};
+
 /* Memory reference statistics for individual memory symbols,
    collected during alias analysis.  */
 struct mem_sym_stats_d GTY(())
@@ -228,6 +247,9 @@ struct ptr_info_def GTY(())
   /* Nonzero if this pointer points to NULL.  */
   unsigned int pt_null : 1;
 
+  /* Mask of reasons this pointer's value escapes the function  */
+  ENUM_BITFIELD (escape_type) escape_mask : 9;
+
   /* Set of variables that this pointer may point to.  */
   bitmap pt_vars;
 
@@ -236,9 +258,6 @@ struct ptr_info_def GTY(())
      pointer will be represented by this memory tag, instead of the type
      tag computed by TBAA.  */
   tree name_mem_tag;
-
-  /* Mask of reasons this pointer's value escapes the function  */
-  unsigned int escape_mask;
 };
 
 
@@ -343,13 +362,17 @@ struct var_ann_d GTY(())
   unsigned is_heapvar : 1;
 
   /* True if the variable is call clobbered.  */
-  unsigned int call_clobbered : 1;
+  unsigned call_clobbered : 1;
 
   /* This field describes several "no alias" attributes that some
      symbols are known to have.  See the enum's definition for more
      information on each attribute.  */
   ENUM_BITFIELD (noalias_state) noalias_state : 2;
 
+  /* Mask of values saying the reasons why this variable has escaped
+     the function.  */
+  ENUM_BITFIELD (escape_type) escape_mask : 9;
+
   /* Memory partition tag assigned to this symbol.  */
   tree mpt;
 
@@ -376,10 +399,6 @@ struct var_ann_d GTY(())
   /* If this variable is a structure, this fields holds an array
      of symbols representing each of the fields of the structure.  */
   VEC(tree,gc) *subvars;
-
-  /* Mask of values saying the reasons why this variable has escaped
-     the function.  */
-  unsigned int escape_mask;
 };
 
 /* Container for variable annotation used by hashtable for annotations for
@@ -722,9 +741,13 @@ extern basic_block debug_tree_bb_n (int);
 extern void dump_tree_cfg (FILE *, int);
 extern void debug_tree_cfg (int);
 extern void dump_cfg_stats (FILE *);
+extern void dot_cfg (void);
 extern void debug_cfg_stats (void);
-extern void debug_loop_ir (void);
-extern void print_loop_ir (FILE *);
+extern void debug_loops (int);
+extern void debug_loop (struct loop *, int);
+extern void debug_loop_num (unsigned, int);
+extern void print_loops (FILE *, int);
+extern void print_loops_bb (FILE *, basic_block, int, int);
 extern void cleanup_dead_labels (void);
 extern void group_case_labels (void);
 extern tree first_stmt (basic_block);
@@ -769,6 +792,7 @@ extern void end_recording_case_labels (void);
 extern basic_block move_sese_region_to_fn (struct function *, basic_block,
                                           basic_block);
 void remove_edge_and_dominated_blocks (edge);
+void mark_virtual_ops_in_bb (basic_block);
 
 /* In tree-cfgcleanup.c  */
 extern bitmap cfgcleanup_altered_bbs;
@@ -799,6 +823,11 @@ extern void find_new_referenced_vars (tree *);
 extern tree make_rename_temp (tree, const char *);
 extern void set_default_def (tree, tree);
 extern tree gimple_default_def (struct function *, tree);
+extern bool stmt_references_abnormal_ssa_name (tree);
+extern bool refs_may_alias_p (tree, tree);
+extern tree get_single_def_stmt (tree);
+extern tree get_single_def_stmt_from_phi (tree, tree);
+extern tree get_single_def_stmt_with_phi (tree, tree);
 
 /* In tree-phinodes.c  */
 extern void reserve_phi_args_for_new_edge (basic_block);
@@ -854,7 +883,30 @@ typedef bool (*walk_use_def_chains_fn) (tree, tree, void *);
 /* In tree-ssa-alias-warnings.c  */
 extern void strict_aliasing_warning_backend (void);
 
+
 /* In tree-ssa.c  */
+
+/* Mapping for redirected edges.  */
+struct _edge_var_map GTY(())
+{
+  tree result;                 /* PHI result.  */
+  tree def;                    /* PHI arg definition.  */
+};
+typedef struct _edge_var_map edge_var_map;
+
+DEF_VEC_O(edge_var_map);
+DEF_VEC_ALLOC_O(edge_var_map, heap);
+
+/* A vector of var maps.  */
+typedef VEC(edge_var_map, heap) *edge_var_map_vector;
+
+extern void redirect_edge_var_map_add (edge, tree, tree);
+extern void redirect_edge_var_map_clear (edge);
+extern void redirect_edge_var_map_dup (edge, edge);
+extern edge_var_map_vector redirect_edge_var_map_vector (edge);
+extern void redirect_edge_var_map_destroy (void);
+
+
 extern void init_tree_ssa (void);
 extern edge ssa_redirect_edge (edge, basic_block);
 extern void flush_pending_stmts (edge);
@@ -865,6 +917,8 @@ extern void verify_ssa (bool);
 extern void delete_tree_ssa (void);
 extern void walk_use_def_chains (tree, walk_use_def_chains_fn, void *, bool);
 extern bool stmt_references_memory_p (tree);
+extern bool ssa_undefined_value_p (tree);
+
 
 /* In tree-into-ssa.c  */
 void update_ssa (unsigned);
@@ -886,7 +940,8 @@ void set_current_def (tree, tree);
 /* In tree-ssa-ccp.c  */
 bool fold_stmt (tree *);
 bool fold_stmt_inplace (tree);
-tree widen_bitfield (tree, tree, tree);
+tree get_symbol_constant_value (tree);
+tree fold_const_aggregate_ref (tree);
 
 /* In tree-vrp.c  */
 tree vrp_evaluate_conditional (tree, tree);
@@ -989,7 +1044,6 @@ bool for_each_index (tree *, bool (*) (tree, tree *, void *), void *);
 void create_iv (tree, tree, tree, struct loop *, block_stmt_iterator *, bool,
                tree *, tree *);
 basic_block split_loop_exit_edge (edge);
-unsigned force_expr_to_var_cost (tree);
 void standard_iv_increment_position (struct loop *, block_stmt_iterator *,
                                     bool *);
 basic_block ip_end_pos (struct loop *);
@@ -998,6 +1052,8 @@ bool tree_duplicate_loop_to_header_edge (struct loop *, edge,
                                         unsigned int, sbitmap,
                                         edge, VEC (edge, heap) **,
                                         int);
+struct loop *slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *, edge);
+void rename_variables_in_loop (struct loop *);
 struct loop *tree_ssa_loop_version (struct loop *, tree,
                                    basic_block *);
 tree expand_simple_operations (tree);
@@ -1033,25 +1089,6 @@ enum move_pos
 extern enum move_pos movement_possibility (tree);
 char *get_lsm_tmp_name (tree, unsigned);
 
-/* The reasons a variable may escape a function.  */
-enum escape_type 
-{
-  NO_ESCAPE = 0,                       /* Doesn't escape.  */
-  ESCAPE_STORED_IN_GLOBAL = 1 << 1,
-  ESCAPE_TO_ASM = 1 << 2,              /* Passed by address to an assembly
-                                          statement.  */
-  ESCAPE_TO_CALL = 1 << 3,             /* Escapes to a function call.  */
-  ESCAPE_BAD_CAST = 1 << 4,            /* Cast from pointer to integer */
-  ESCAPE_TO_RETURN = 1 << 5,           /* Returned from function.  */
-  ESCAPE_TO_PURE_CONST = 1 << 6,       /* Escapes to a pure or constant
-                                          function call.  */
-  ESCAPE_IS_GLOBAL = 1 << 7,           /* Is a global variable.  */
-  ESCAPE_IS_PARM = 1 << 8,             /* Is an incoming function argument.  */
-  ESCAPE_UNKNOWN = 1 << 9              /* We believe it escapes for
-                                          some reason not enumerated
-                                          above.  */
-};
-
 /* In tree-flow-inline.h  */
 static inline bool is_call_clobbered (const_tree);
 static inline void mark_call_clobbered (tree, unsigned int);
@@ -1120,6 +1157,7 @@ extern void register_jump_thread (edge, edge);
 tree force_gimple_operand (tree, tree *, bool, tree);
 tree force_gimple_operand_bsi (block_stmt_iterator *, tree, bool, tree,
                               bool, enum bsi_iterator_update);
+tree gimple_fold_indirect_ref (tree);
 
 /* In tree-ssa-structalias.c */
 bool find_what_p_points_to (tree);
@@ -1159,15 +1197,14 @@ struct fieldoff
   /* Field.  */
   tree decl;
 
-  /* True if this field is inside a structure nested inside the base
-     containing object.  */
-  unsigned int in_nested_struct : 1;
-
   /* Offset from the base of the base containing object to this field.  */
   HOST_WIDE_INT offset;  
 
   /* Alias set for the field.  */
   alias_set_type alias_set;
+
+  /* True, if this offset can be a base for further component accesses.  */
+  unsigned base_for_components : 1;
 };
 typedef struct fieldoff fieldoff_s;