------- Comment #12 from pbrook at gcc dot gnu dot org 2006-04-04 17:40 ------- Subject: Bug 18527
Author: pbrook Date: Tue Apr 4 17:40:00 2006 New Revision: 112675 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112675 Log: 2006-04-04 Paul Brook <[EMAIL PROTECTED]> Backport form mainline. gcc/ 2006-01-14 Zdenek Dvorak <[EMAIL PROTECTED]> * tree-ssa-loop-niter.c (number_of_iterations_cond): Split into several functions. (number_of_iterations_ne, number_of_iterations_lt_to_ne, assert_no_overflow_lt, assert_loop_rolls_lt, number_of_iterations_lt, number_of_iterations_le): New functions. (number_of_iterations_special): Removed. (number_of_iterations_exit): Do not use number_of_iterations_special. * tree.c (unsigned_type_for): Always return integer type. 2005-01-06 Zdenek Dvorak <[EMAIL PROTECTED]> 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/testsuite/ * gcc.c-torture/execute/loop-ivopts-3.c: New test. 2005-01-14 Zdenek Dvorak <[EMAIL PROTECTED]> * gcc.dg/tree-ssa/pr19210-1.c: Update outcome. Add new test loop. * gcc.dg/tree-ssa/pr19210-2.c: Ditto. Added: branches/gcc-4_1-branch/gcc/testsuite/gcc.c-torture/execute/loop-ivopts-3.c Modified: branches/gcc-4_1-branch/gcc/ChangeLog branches/gcc-4_1-branch/gcc/testsuite/ChangeLog branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/pr19210-2.c branches/gcc-4_1-branch/gcc/tree-chrec.c branches/gcc-4_1-branch/gcc/tree-scalar-evolution.c branches/gcc-4_1-branch/gcc/tree-scalar-evolution.h branches/gcc-4_1-branch/gcc/tree-ssa-loop-ivopts.c branches/gcc-4_1-branch/gcc/tree-ssa-loop-niter.c branches/gcc-4_1-branch/gcc/tree.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18527