<div dir="ltr"><div><div>On Fri, May 2, 2014 at 6:04 PM, Tobias Grosser <span dir="ltr"><<a href="mailto:tobias@grosser.es" target="_blank">tobias@grosser.es</a>></span> wrote:<br></div></div><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">On 03/05/2014 01:01, Paul Vario wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
On Fri, May 2, 2014 at 5:30 PM, Tobias Grosser <<a href="mailto:tobias@grosser.es" target="_blank">tobias@grosser.es</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
On 03/05/2014 00:15, Paul Vario wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hi Tobias,<br>
<br>
       Thanks so much for the quick response. Your approach fixes the<br>
issue.<br>
       On a bigger context, would it make more sense to make the region<br>
exit<br>
part of the region? For example, a while loop gets lowered down to LLVM IR<br>
contains while.cond, while.body and while.end. If one tries to use<br>
RegionInfo as a substitute for structural analysis, she might think<br>
while.end should belong to the region/structure ... is it necessary to<br>
exclude the exit from being part of the region or both ways are equally<br>
correct in terms of uniquely representing regions?<br>
<br>
</blockquote>
<br>
The region provides both the exiting blocks as well as the exit block. So<br>
you should have all you need, no?<br>
<br>
</blockquote>
Yes, the region interface suffices all my needs. It just does not contain<br>
an "iterator" that can iterate all the basic blocks<br>
in the region plus the exit at once. What I usually do, under this kind of<br>
situation, is to define a std::vector of basicblocks,<br>
push all the basic blocks in the region using block_iterator in a for loop.<br>
And then, at the end, push_back(region->getExit()).<br>
</blockquote>
<br></div>
Why would you need such an iterator? The exit is not part of the region, so I am slightly surprised you expect it to be enumerated.<span class=""><font color="#888888"><br>
<br>
Tobias<br>
</font></span></blockquote></div>Had regioninfo been designed so that the region exit to be integral part of a region, then there would be an iterator that enumerates up until exit ... is what I was trying to say. You're totally right, under the current design, there wouldn't be no need for such a iterator. <br>
</div></div>