summaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.h
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2006-11-12 19:58:05 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2006-11-12 19:58:05 +0000
commitfaa56cf9fb2c67f8b284c4d9fcdc641a7728a4a9 (patch)
treecbab0d80fb90aa9c79c2f4bb40c468f14e9b8cb3 /gcc/tree-data-ref.h
parent07804af56cb5e64acc139a5d28dd35c068415859 (diff)
downloadgcc-faa56cf9fb2c67f8b284c4d9fcdc641a7728a4a9.tar.gz
* Makefile.in (tree-data-ref.o): Add langhooks.h dependency.
* tree-ssa-loop-niter.c (derive_constant_upper_bound): Follow ud-chains. Handle AND_EXPR. (record_estimate): Record whether the estimate is realistic and whether it is derived from a loop exit. (record_nonwrapping_iv, idx_infer_loop_bounds, infer_loop_bounds_from_ref, infer_loop_bounds_from_array, infer_loop_bounds_from_signedness): New functions. (compute_estimated_nb_iterations): Take only realistic bounds into account. Set estimate_state. Use double_ints. (infer_loop_bounds_from_undefined): Call infer_loop_bounds_from_array and infer_loop_bounds_from_signedness. Do not consider basic blocks that do not have to be always executed. (estimate_numbers_of_iterations_loop): Set estimate_state, and use it to determine whether to call infer_loop_bounds_from_undefined and compute_estimated_nb_iterations. (n_of_executions_at_most): Use double_ints. (free_numbers_of_iterations_estimates_loop): Set estimate_state. (substitute_in_loop_info): Do not replace in estimated_nb_iterations. * double-int.c (double_int_to_tree): Improve comment. (double_int_fits_to_tree_p): New function. * double-int.h (double_int_fits_to_tree_p): Declare. * tree-data-ref.c: Include langhooks.h. (estimate_niter_from_size_of_data, estimate_iters_using_array): Removed. (analyze_array_indexes): Do not call estimate_niter_from_size_of_data. (analyze_array): Do not pass estimate_only argument to analyze_array_indexes. (get_number_of_iters_for_loop): Build tree from the stored double_int value. (get_references_in_stmt, find_data_references_in_stmt): New functions. (find_data_references_in_loop): Use find_data_references_in_stmt. * tree-data-ref.h (struct data_ref_loc_d): New. (get_references_in_stmt): Declare. (estimate_iters_using_array): Declaration removed. * cfgloop.h (struct nb_iter_bound): Change type of bound to double_int. Improve comments. Add is_exit and realistic fields. (struct loop): Changed type of estimated_nb_iterations to double_int. Added estimate_state field. (record_estimate): Declaration removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118729 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-data-ref.h')
-rw-r--r--gcc/tree-data-ref.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/tree-data-ref.h b/gcc/tree-data-ref.h
index 8cf17ae8fb5..7d6f9f94cb4 100644
--- a/gcc/tree-data-ref.h
+++ b/gcc/tree-data-ref.h
@@ -269,6 +269,21 @@ DEF_VEC_ALLOC_P(ddr_p,heap);
+/* Describes a location of a memory reference. */
+
+typedef struct data_ref_loc_d
+{
+ /* Position of the memory reference. */
+ tree *pos;
+
+ /* True if the memory reference is read. */
+ bool is_read;
+} data_ref_loc;
+
+DEF_VEC_O (data_ref_loc);
+DEF_VEC_ALLOC_O (data_ref_loc, heap);
+
+bool get_references_in_stmt (tree, VEC (data_ref_loc, heap) **);
extern tree find_data_references_in_loop (struct loop *,
VEC (data_reference_p, heap) **);
extern void compute_data_dependences_for_loop (struct loop *, bool,
@@ -292,7 +307,6 @@ extern void free_dependence_relation (struct data_dependence_relation *);
extern void free_dependence_relations (VEC (ddr_p, heap) *);
extern void free_data_refs (VEC (data_reference_p, heap) *);
extern struct data_reference *analyze_array (tree, tree, bool);
-extern void estimate_iters_using_array (tree, tree);
/* Return the index of the variable VAR in the LOOP_NEST array. */