diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-06 23:11:15 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-06 23:11:15 +0000 |
commit | d97e22fb65bb6365d79ae4f291981c27bc0f954a (patch) | |
tree | 6e9884d45709a7814b362ea6e6dbf57ecb1ab63e /gcc/tree-data-ref.c | |
parent | 24fbb6038f8768e9a8e7ad118abfd18b9f6aa221 (diff) | |
download | gcc-d97e22fb65bb6365d79ae4f291981c27bc0f954a.tar.gz |
* tree-ssa-loop-niter.c (idx_infer_loop_bounds): Add and use
argument "reliable".
(infer_loop_bounds_from_ref, infer_loop_bounds_from_array):
Add argument "reliable". Propagate it through calls.
(infer_loop_bounds_from_undefined): Derive number of iterations
estimates from references in blocks that do not dominate loop latch.
(gcov_type_to_double_int): New function.
(estimate_numbers_of_iterations_loop): Use gcov_type_to_double_int
and expected_loop_iterations_unbounded.
* cfgloopanal.c (expected_loop_iterations_unbounded): New function.
(expected_loop_iterations): Use expected_loop_iterations_unbounded.
* tree-data-ref.c (estimated_loop_iterations): Export.
(get_references_in_stmt): Fix -- do not return addresses of local
objects.
* cfgloop.h (expected_loop_iterations_unbounded,
estimated_loop_iterations): Declare.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123630 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r-- | gcc/tree-data-ref.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index d8a291d6b12..3f24c6a5147 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -2553,7 +2553,7 @@ analyze_ziv_subscript (tree chrec_a, large as the number of iterations. If we have no reliable estimate, the function returns false, otherwise returns true. */ -static bool +bool estimated_loop_iterations (struct loop *loop, bool conservative, double_int *nit) { @@ -4873,8 +4873,7 @@ get_references_in_stmt (tree stmt, VEC (data_ref_loc, heap) **references) { bool clobbers_memory = false; data_ref_loc *ref; - tree *op0, *op1, arg, call; - call_expr_arg_iterator iter; + tree *op0, *op1, call; *references = NULL; @@ -4915,9 +4914,12 @@ get_references_in_stmt (tree stmt, VEC (data_ref_loc, heap) **references) if (call) { - FOR_EACH_CALL_EXPR_ARG (arg, iter, call) + unsigned i, n = call_expr_nargs (call); + + for (i = 0; i < n; i++) { - op0 = &arg; + op0 = &CALL_EXPR_ARG (call, i); + if (DECL_P (*op0) || REFERENCE_CLASS_P (*op0)) { |