[LLVMdev] question about BasicBlock
Vikram Adve
vadve at cs.uiuc.edu
Mon Nov 11 16:32:01 PST 2002
Xiaodong,
Note that there is already a DFS iterator for the CFG. See
include/llvm/Support/CFG.h
include/Support/PostOrderIterator.h
--Vikram
http://www.cs.uiuc.edu/~vadve
> From: Chris Lattner <sabre at nondot.org>
> Subject: Re: [LLVMdev] question about BasicBlock
> Sender: llvmdev-admin at cs.uiuc.edu
> Date: Mon, 11 Nov 2002 16:24:42 -0600 (CST)
>
>
> > Is there any simple way to decide whether there is a control path from one
> > Basic Block to another Basic Block?
>
> No efficient way, but you could do a depth first search...
>
> If you are looking for a DIRECT connection, try the
> succ_begin()/succ_end() iterators (which loop over successors).
>
> -Chris
>
> --
> http://llvm.cs.uiuc.edu/
> http://www.nondot.org/~sabre/Projects/
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
>
More information about the llvm-dev
mailing list