aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@multimania.com>2002-06-15 00:47:53 +0000
committerRichard Henderson <rth@gcc.gnu.org>2002-06-14 17:47:53 -0700
commit048c86160456fc8b165ec3a9761166896d17d566 (patch)
tree1ac5195ffc0714d0aa1bded32ae53682474e6221
parent0b0b07504cd9fa9f95bbdb88a2a555960399713c (diff)
downloadgcc-048c86160456fc8b165ec3a9761166896d17d566.zip
gcc-048c86160456fc8b165ec3a9761166896d17d566.tar.gz
gcc-048c86160456fc8b165ec3a9761166896d17d566.tar.bz2
* loop.c (for_each_insn_in_loop): Fix formatting and comments.
From-SVN: r54633
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/loop.c15
2 files changed, 10 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 160c962..2bb93ed 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,8 @@
2002-06-14 Eric Botcazou <ebotcazou@multimania.com>
+
+ * loop.c (for_each_insn_in_loop): Fix formatting and comments.
+
+2002-06-14 Eric Botcazou <ebotcazou@multimania.com>
PR c/6677
* convert.c (convert_to_integer) [LSHIFT_EXPR]: Don't pass
diff --git a/gcc/loop.c b/gcc/loop.c
index 85c9c9f..d3b62af 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -4247,8 +4247,8 @@ static rtx addr_placeholder;
LOOP and INSN parameters pass MAYBE_MULTIPLE and NOT_EVERY_ITERATION to the
callback.
- NOT_EVERY_ITERATION if current insn is not executed at least once for every
- loop iteration except for the last one.
+ NOT_EVERY_ITERATION is 1 if current insn is not known to be executed at
+ least once for every loop iteration except for the last one.
MAYBE_MULTIPLE is 1 if current insn may be executed more than once for every
loop iteration.
@@ -4258,8 +4258,6 @@ for_each_insn_in_loop (loop, fncall)
struct loop *loop;
loop_insn_callback fncall;
{
- /* This is 1 if current insn is not executed at least once for every loop
- iteration. */
int not_every_iteration = 0;
int maybe_multiple = 0;
int past_loop_latch = 0;
@@ -4271,8 +4269,7 @@ for_each_insn_in_loop (loop, fncall)
if (prev_nonnote_insn (loop->scan_start) != prev_nonnote_insn (loop->start))
maybe_multiple = back_branch_in_range_p (loop, loop->scan_start);
- /* Scan through loop to find all possible bivs. */
-
+ /* Scan through loop and update NOT_EVERY_ITERATION and MAYBE_MULTIPLE. */
for (p = next_insn_in_loop (loop, loop->scan_start);
p != NULL_RTX;
p = next_insn_in_loop (loop, p))
@@ -4329,9 +4326,9 @@ for_each_insn_in_loop (loop, fncall)
This can be any kind of jump, since we want to know if insns
will be executed if the loop is executed. */
&& !(JUMP_LABEL (p) == loop->top
- && ((NEXT_INSN (NEXT_INSN (p)) == loop->end
- && any_uncondjump_p (p))
- || (NEXT_INSN (p) == loop->end && any_condjump_p (p)))))
+ && ((NEXT_INSN (NEXT_INSN (p)) == loop->end
+ && any_uncondjump_p (p))
+ || (NEXT_INSN (p) == loop->end && any_condjump_p (p)))))
{
rtx label = 0;