diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2010-05-28 18:42:15 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2010-05-28 18:42:15 +0000 |
commit | 0a74c7586cbf24b875c05507e6861070e74ffb69 (patch) | |
tree | fd9dab29f46e485b9afc38a2e968d2b4f9bb77eb /gcc/cfgloop.h | |
parent | e7cb8957bf8709677b85ba17fa3f9231633aaede (diff) | |
download | gcc-0a74c7586cbf24b875c05507e6861070e74ffb69.zip gcc-0a74c7586cbf24b875c05507e6861070e74ffb69.tar.gz gcc-0a74c7586cbf24b875c05507e6861070e74ffb69.tar.bz2 |
When niter may be zero, return a COND_EXPR with the may_be_zero condition.
2010-05-28 Sebastian Pop <sebastian.pop@amd.com>
* tree-scalar-evolution.c (set_nb_iterations_in_loop): Inlined in the
only place it was called from.
(number_of_latch_executions): Do not return chrec_dont_know when the
may_be_zero is a runtime condition: instead, return a COND_EXPR
including the may_be_zero condition.
* cfgloop.h (struct loop): Add a note on COND_EXPRs to the comment
of nb_iterations.
* tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Handle
COND_EXPRs.
* gcc.dg/vect/vect-outer-fir-lb.c: Un-XFAIL-ed.
From-SVN: r159992
Diffstat (limited to 'gcc/cfgloop.h')
-rw-r--r-- | gcc/cfgloop.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index 96911c6..3821ee6 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -134,11 +134,13 @@ struct GTY ((chain_next ("%h.next"))) loop { /* Auxiliary info specific to a pass. */ PTR GTY ((skip (""))) aux; - /* The number of times the latch of the loop is executed. - This is an INTEGER_CST or an expression containing symbolic - names. Don't access this field directly: - number_of_latch_executions computes and caches the computed - information in this field. */ + /* The number of times the latch of the loop is executed. This can be an + INTEGER_CST, or a symbolic expression representing the number of + iterations like "N - 1", or a COND_EXPR containing the runtime + conditions under which the number of iterations is non zero. + + Don't access this field directly: number_of_latch_executions + computes and caches the computed information in this field. */ tree nb_iterations; /* An integer guaranteed to bound the number of iterations of the loop |