[LLVMdev] a basic question about BB

Chris Lattner sabre at nondot.org
Wed Nov 13 21:25:01 PST 2002


> Dear LLVM,
>
> I want to know, given a function,  How do I know which block is entry
> block, which blocks are exit blocks? Is there any efficient way to
> dicectly get that information?

Given a function you can always use Function::getEntryBlock() to get the
entry block.  You need to scan the function to get the returning nodes.

-Chris "llvm" Lattner

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/





More information about the llvm-dev mailing list