[LLVMdev] CFG leaf node
Devang Patel
dpatel at apple.com
Wed Aug 8 09:58:03 PDT 2007
On Aug 8, 2007, at 9:44 AM, Seung Jae Lee wrote:
> Is there any way to figure out very quickly that 'bb6' basic block
> has no child in CFG without any checking process the last
> terminating instruction is not 'br'?
Check successor iterator.
if (succ_begin(BB) == succ_end(BB))
BB has no successor in CFG.
See include/llvm/Support/CFG.h for more info.
-
Devang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070808/9f85a4ad/attachment.html>
More information about the llvm-dev
mailing list