This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix loop_iterations mishandling of multipleconditionalized exit tests
- To: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Subject: Re: [PATCH] Fix loop_iterations mishandling of multipleconditionalized exit tests
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Mon, 08 Oct 2001 12:08:08 -0700
- cc: Jim Wilson <wilson at redhat dot com>
> Even though I'm sure about the analysis, I'm not 100% sure about the
> patch, eg. is the uid_luid array always correctly initialized at this
> point? Do I need to loosen/strengthen some conditions? What about
> slightely different loop constructs with eg. VTOP?
To make sure I understand, the problem is something like (in a C
representation):
while (1) {
a:
b:
if (cond1) goto a;
if (cond2) goto b;
break;
}
Then, we don't see that there are multiple back edges. Right?
Yes, uid_luid will be initialized: loop_iterations is only called
from strength_reduce, which is only called from scan_loop, which is
only called from loop_optimize.
I'm not sure about the other questions in your patch. I suspect that,
indeed, something needs to be done about vtop.
Since, however, your patch seems safe, seems to solve a real problem,
and, as far as I can tell doesn't pessimize any code that we can
handle safely, I'll approve it, for both the mainline and the branch.
Please let me know privately when you've checked it in.
Thank you,
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com