This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Fix loop_iterations mishandling of multipleconditionalized exit tests



> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]