[cfe-dev] Clang Control Flow Graph?

Jordan Rose jordan_rose at apple.com
Wed Aug 7 09:30:35 PDT 2013


Hi, Masoug. No, I don't think it's safe to make that assumption, even if it's true today. You'll have to use a visited set; llvm::SmallPtrSet should be able to handle it quite well.

Best,
Jordan


On Aug 6, 2013, at 18:37 , Sung-Yee Guo <masoug at gmail.com> wrote:

> Hi,
> Just a quick question: Are the CFGBlock IDs strictly assigned in the depth-first order? I was trying to traverse the CFG but terminators like for loops "trap" me into an infinite loop; the successors have a path back to the predecessor of some blocks. My thinking was that if the block ids were assigned in a specific order, I may be able to use them as a way to avoid running into infinite loops (and stack overflows).
> 
> Thanks!
> -Masoug
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130807/9a2d01e7/attachment.html>


More information about the cfe-dev mailing list