Thanks Michael. Can you please explain you way a bit more? Did you run a function pass then a loop pass? <br><br><br><div class="gmail_quote">On Mon, May 9, 2011 at 12:56 PM, Michael Ilseman <span dir="ltr"><<a href="mailto:michael@lunarg.com">michael@lunarg.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Whenever I was tying to do that (in version 2.8), it didn't give them<br>
to me in a topological order. What I did, as a hack-ish temporary<br>
measure, was rely on Function's ordering, and just iterated over all<br>
the blocks in the function, checking to see if the loop contains that<br>
block. Not at all ideal, and what I was writing later evolved to not<br>
need the topological ordering constraint, so I never revisited the<br>
problem. In hindsight, I don't even know if Function guarantees that<br>
they are presented in a topological order, but it always happened to<br>
be the case for me.<br>
<div><div></div><div class="h5"><br>
<br>
On Mon, May 9, 2011 at 10:45 AM, Naznin Fauzia <<a href="mailto:laboni14@gmail.com">laboni14@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I have a question about llvm::LoopBase  getBlocks() method. Does it return<br>
> the basic blocks inside the loop in random order? I need to order the blocks<br>
> in some valid topological ordering of the AST. If getBlocks() does not do<br>
> that,  what can I do to find the ordering?<br>
><br>
> Thanks,<br>
> Naznin<br>
><br>
</div></div>> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
><br>
><br>
</blockquote></div><br>