Makefile.in (OBJS-common): Add gimple-fold.o.

2010-04-15  Richard Guenther  <rguenther@suse.de>

	* Makefile.in (OBJS-common): Add gimple-fold.o.
	(gimple-fold.o): New rule.
	* tree.h (maybe_fold_offset_to_reference,
	maybe_fold_offset_to_address, maybe_fold_stmt_addition): Move
	prototypes ...
	* gimple.h: ... here.
	* tree-flow.h (fold_stmt, fold_stmt_inplace, get_symbol_constant_value,
	may_propagate_address_into_dereference): Move prototypes ...
	* gimple.h: ... here.
	* tree-ssa-ccp.c (get_symbol_constant_value,
	may_propagate_address_into_dereference, maybe_fold_offset_to_array_ref,
	maybe_fold_offset_to_component_ref, maybe_fold_offset_to_reference,
	maybe_fold_offset_to_address, maybe_fold_stmt_indirect,
	maybe_fold_stmt_addition, maybe_fold_reference, get_maxval_strlen,
	ccp_fold_builtin, fold_gimple_assign, fold_gimple_cond,
	fold_gimple_call, fold_stmt_1, fold_stmt, fold_stmt_inplace,
	gimplify_and_update_call_from_tree): Move ...
	* gimple-fold.c: ... here.  New file.
	(ccp_fold_builtin): Rename to ...
	(gimple_fold_builtin): ... this.
	* tree-ssa-ccp.c (execute_fold_all_builtins): Adjust.

From-SVN: r158373
This commit is contained in:
Richard Guenther 2010-04-15 12:58:05 +00:00 committed by Richard Biener
parent 330db1e301
commit cbdd87d444
7 changed files with 1639 additions and 1563 deletions

View File

@ -1,3 +1,27 @@
2010-04-15 Richard Guenther <rguenther@suse.de>
* Makefile.in (OBJS-common): Add gimple-fold.o.
(gimple-fold.o): New rule.
* tree.h (maybe_fold_offset_to_reference,
maybe_fold_offset_to_address, maybe_fold_stmt_addition): Move
prototypes ...
* gimple.h: ... here.
* tree-flow.h (fold_stmt, fold_stmt_inplace, get_symbol_constant_value,
may_propagate_address_into_dereference): Move prototypes ...
* gimple.h: ... here.
* tree-ssa-ccp.c (get_symbol_constant_value,
may_propagate_address_into_dereference, maybe_fold_offset_to_array_ref,
maybe_fold_offset_to_component_ref, maybe_fold_offset_to_reference,
maybe_fold_offset_to_address, maybe_fold_stmt_indirect,
maybe_fold_stmt_addition, maybe_fold_reference, get_maxval_strlen,
ccp_fold_builtin, fold_gimple_assign, fold_gimple_cond,
fold_gimple_call, fold_stmt_1, fold_stmt, fold_stmt_inplace,
gimplify_and_update_call_from_tree): Move ...
* gimple-fold.c: ... here. New file.
(ccp_fold_builtin): Rename to ...
(gimple_fold_builtin): ... this.
* tree-ssa-ccp.c (execute_fold_all_builtins): Adjust.
2010-04-15 Richard Guenther <rguenther@suse.de>
* fold-const.c (LOWPART, HIGHPART, BASE, encode, decode,

View File

@ -1207,6 +1207,7 @@ OBJS-common = \
ggc-common.o \
gimple.o \
gimple-iterator.o \
gimple-fold.o \
gimple-low.o \
gimple-pretty-print.o \
gimplify.o \
@ -2534,6 +2535,11 @@ gimplify.o : gimplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(GIMPLE_H) \
$(REAL_H) $(SPLAY_TREE_H) vec.h tree-iterator.h tree-pass.h
gimple-iterator.o : gimple-iterator.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TREE_H) $(GIMPLE_H) $(TREE_FLOW_H) value-prof.h
gimple-fold.o : gimple-fold.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h \
$(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
$(TREE_DUMP_H) $(BASIC_BLOCK_H) $(TREE_PASS_H) langhooks.h \
tree-ssa-propagate.h value-prof.h $(FLAGS_H) $(TARGET_H)
gimple-low.o : gimple-low.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(DIAGNOSTIC_H) $(GIMPLE_H) $(TREE_INLINE_H) $(VARRAY_H) langhooks.h \
$(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TM_H) coretypes.h \

1596
gcc/gimple-fold.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4787,4 +4787,16 @@ gimple_alloc_kind (enum gimple_code code)
extern void dump_gimple_statistics (void);
/* In gimple-fold.c. */
void gimplify_and_update_call_from_tree (gimple_stmt_iterator *, tree);
tree gimple_fold_builtin (gimple);
bool fold_stmt (gimple_stmt_iterator *);
bool fold_stmt_inplace (gimple);
tree maybe_fold_offset_to_reference (location_t, tree, tree, tree);
tree maybe_fold_offset_to_address (location_t, tree, tree, tree);
tree maybe_fold_stmt_addition (location_t, tree, tree, tree);
tree get_symbol_constant_value (tree);
bool may_propagate_address_into_dereference (tree, tree);
#endif /* GCC_GIMPLE_H */

View File

@ -614,12 +614,7 @@ extern void ssanames_print_statistics (void);
#endif
/* In tree-ssa-ccp.c */
bool fold_stmt (gimple_stmt_iterator *);
bool fold_stmt_inplace (gimple);
tree get_symbol_constant_value (tree);
tree fold_const_aggregate_ref (tree);
bool may_propagate_address_into_dereference (tree, tree);
/* In tree-ssa-dom.c */
extern void dump_dominator_optimization_stats (FILE *);

File diff suppressed because it is too large Load Diff

View File

@ -5282,11 +5282,6 @@ struct GTY(()) tree_priority_map {
tree target_for_debug_bind (tree);
/* In tree-ssa-ccp.c */
extern tree maybe_fold_offset_to_reference (location_t, tree, tree, tree);
extern tree maybe_fold_offset_to_address (location_t, tree, tree, tree);
extern tree maybe_fold_stmt_addition (location_t, tree, tree, tree);
/* In tree-ssa-address.c. */
extern tree tree_mem_ref_addr (tree, tree);
extern void copy_mem_ref_info (tree, tree);