This is the mail archive of the
mailing list for the GCC project.
Re: Problem with recent fixes in loop_iterations ?
- From: Olivier Hainque <hainque at ACT-Europe dot FR>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Franz dot Sirl-kernel at lauterbach dot com, gcc at gcc dot gnu dot org
- Date: 29 Nov 2001 10:35:22 +0100
- Subject: Re: Problem with recent fixes in loop_iterations ?
- References: <firstname.lastname@example.org><20011127135333.C30114@redhat.com>
Richard Henderson <email@example.com> writes:
> The test must be refined a good deal to deal with a switch statement.
> Probably you should notice the ADDR_VEC | ADDR_DIFF_VEC and give up.
This part of the compiler is not very familiar to me. By give up, you mean
returning 0, or would something like below be appropriate ? In any case,
I'll prepare a properly formed submission.
Thanks for your help,
*** unroll.c 2001/11/27 22:09:09 1.149
--- unroll.c 2001/11/29 09:32:44
*************** loop_iterations (loop)
*** 3529,3534 ****
--- 3529,3536 ----
if (GET_CODE (temp) == JUMP_INSN
+ /* Avoid analyzing jumps not related to the loop. */
+ && JUMP_LABEL (temp) != 0
/* Previous unrolling may have generated new insns not covered
by the uid_luid array. */
&& INSN_UID (JUMP_LABEL (temp)) < max_uid_for_loop