diff options
author | Bin Cheng <bin.cheng@arm.com> | 2015-06-02 10:19:18 +0000 |
---|---|---|
committer | Bin Cheng <amker@gcc.gnu.org> | 2015-06-02 10:19:18 +0000 |
commit | 2f07b722ed0302ded58710b6d8485d85d785b4ee (patch) | |
tree | 5afe55006761ff005599d44216fad2d86d243e58 /gcc/cfgloop.h | |
parent | b47717225bfbffb2e06c0f2a7e72b458ba40fc17 (diff) | |
download | gcc-2f07b722ed0302ded58710b6d8485d85d785b4ee.zip gcc-2f07b722ed0302ded58710b6d8485d85d785b4ee.tar.gz gcc-2f07b722ed0302ded58710b6d8485d85d785b4ee.tar.bz2 |
re PR tree-optimization/48052 (loop not vectorized if index is "unsigned int")
PR tree-optimization/48052
* cfgloop.h (struct control_iv): New.
(struct loop): New field control_ivs.
* tree-ssa-loop-niter.c : Include "stor-layout.h".
(number_of_iterations_lt): Set no_overflow information.
(number_of_iterations_exit): Init control iv in niter struct.
(record_control_iv): New.
(estimate_numbers_of_iterations_loop): Call record_control_iv.
(loop_exits_before_overflow): New. Interface factored out of
scev_probably_wraps_p.
(scev_probably_wraps_p): Factor loop niter related code into
loop_exits_before_overflow.
(free_numbers_of_iterations_estimates_loop): Free control ivs.
* tree-ssa-loop-niter.h (free_loop_control_ivs): New.
gcc/testsuite/ChangeLog
PR tree-optimization/48052
* gcc.dg/tree-ssa/scev-8.c: New.
* gcc.dg/tree-ssa/scev-9.c: New.
* gcc.dg/tree-ssa/scev-10.c: New.
* gcc.dg/vect/pr48052.c: New.
From-SVN: r224020
Diffstat (limited to 'gcc/cfgloop.h')
-rw-r--r-- | gcc/cfgloop.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index 1d84572..b011678 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -116,6 +116,14 @@ enum loop_estimation EST_LAST }; +/* The structure describing non-overflow control induction variable for + loop's exit edge. */ +struct GTY ((chain_next ("%h.next"))) control_iv { + tree base; + tree step; + struct control_iv *next; +}; + /* Structure to hold information for each natural loop. */ struct GTY ((chain_next ("%h.next"))) loop { /* Index into loops array. */ @@ -203,6 +211,9 @@ struct GTY ((chain_next ("%h.next"))) loop { /* Upper bound on number of iterations of a loop. */ struct nb_iter_bound *bounds; + /* Non-overflow control ivs of a loop. */ + struct control_iv *control_ivs; + /* Head of the cyclic list of the exits of the loop. */ struct loop_exit *exits; |