hi, how to get the number of immediate predecessors for each basic block (arguements of remarks statement at the beginning of the basic block) thank you aditya ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
Hi Aditya,> how to get the number of immediate predecessors for > each basic block (arguements of remarks statement at > the beginning of the basic block) >Look at include/llvm/Support/CFG.h. It has a "pred_iterator" definition. So you can probably do something along the lines of: BasicBlock *BB; pred_iterator PI = pred_begin(BB); pred_iterator PE = pred_end(BB); for (; PI != PE; ++PI) { // Do something } Do a search on the code base to see examples of its use. Cheers! -bw
On Wed, 2 Jan 2008, aditya vishnubhotla wrote:> how to get the number of immediate predecessors for > each basic block (arguements of remarks statement at > the beginning of the basic block)I added this to the programmer's manual: http://llvm.org/docs/ProgrammersManual.html#iterate_preds -Chris -- http://nondot.org/sabre/ http://llvm.org/