diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-06 20:22:56 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-06 20:22:56 +0000 |
commit | 553b952322f47e716baf4dd29392d4ab8bc94f98 (patch) | |
tree | 2f80a9e9f7dc377dcb9bdd829e0f2a5a8d6c28d9 /gcc/tree-scalar-evolution.h | |
parent | 25d080049e3809ad7de5583001b17b8926022902 (diff) | |
download | gcc-553b952322f47e716baf4dd29392d4ab8bc94f98.tar.gz |
PR tree-optimization/18527
* tree-ssa-loop-niter.c (number_of_iterations_cond,
number_of_iterations_special, number_of_iterations_exit):
Move base and step of an iv to a single structure. Add
no_overflow flag, and use it in # of iterations analysis.
* tree-scalar-evolution.c (analyze_scalar_evolution_in_loop): Add
folded_casts argument.
(simple_iv): Pass base and step in a structure. Set no_overflow
flag.
(scev_const_prop): Add argument to analyze_scalar_evolution_in_loop.
Evaluate expensiveness of computing # of iterations instead of
the final expression.
* tree-scalar-evolution.h (affine_iv): New structure.
(simple_iv): Declaration changed.
* tree-chrec.c (chrec_apply): Handle chrecs containing symbols.
* tree-ssa-loop-ivopts.c (determine_biv_step, find_givs_in_stmt_scev,
find_givs_in_stmt): Changed due to simple_iv change.
* gcc.dg/tree-ssa/loop-15.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109427 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-scalar-evolution.h')
-rw-r--r-- | gcc/tree-scalar-evolution.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/tree-scalar-evolution.h b/gcc/tree-scalar-evolution.h index 60878b1d97e..0fecaee2390 100644 --- a/gcc/tree-scalar-evolution.h +++ b/gcc/tree-scalar-evolution.h @@ -32,7 +32,19 @@ extern tree analyze_scalar_evolution (struct loop *, tree); extern tree instantiate_parameters (struct loop *, tree); extern void gather_stats_on_scev_database (void); extern void scev_analysis (void); -extern bool simple_iv (struct loop *, tree, tree, tree *, tree *, bool); void scev_const_prop (void); +/* Affine iv. */ + +typedef struct +{ + /* Iv = BASE + STEP * i. */ + tree base, step; + + /* True if this iv does not overflow. */ + bool no_overflow; +} affine_iv; + +extern bool simple_iv (struct loop *, tree, tree, affine_iv *, bool); + #endif /* GCC_TREE_SCALAR_EVOLUTION_H */ |