On Wed, Oct 17, 2012 at 8:41 AM, Krzysztof Parzyszek <span dir="ltr"><<a href="mailto:kparzysz@codeaurora.org" target="_blank">kparzysz@codeaurora.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hello All,<br>
<br>
The current implementation of the CFG simplification is loop-agnostic. In the past I have observed that it can perform transformations that can be detrimental to the loop structure.  One example that I recall, is converting a loop like this:<br>


   while (...) {<br>
      ...<br>
      if (cond) continue;<br>
      ...<br>
   }<br>
into two nested loops.  Specifically, the "continue" branch would go back to the loop header making it appear as if there were two back edges.<br></blockquote><div><br></div><div>Well, there really are two backedges there.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
What are your thoughts about either making the CFG simplification aware of loops in its entirety, or separating the "safe" transformations in a quick pass, and having a more aggressive pass that does preserve loop structure?</blockquote>

<div><br></div><div>It's not clear what the problem is.</div><div><br></div><div>Dan</div><div> </div></div>