[cfe-dev] Clang Control Flow Graph?

Sung-Yee Guo masoug at gmail.com
Wed Aug 7 09:36:20 PDT 2013


Thanks for the reply! I'll just check the block terminator type then.

-Masoug


From:  Jordan Rose <jordan_rose at apple.com>
Date:  Wednesday, August 7, 2013 9:30 AM
To:  Sung-Yee Guo <masoug at gmail.com>
Cc:  <cfe-dev at cs.uiuc.edu>, Developers <cfe-dev at cs.uiuc.edu>
Subject:  Re: [cfe-dev] Clang Control Flow Graph?

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/7255c8c0/attachment.html>


More information about the cfe-dev mailing list