search for: onepredecessor

Displaying 1 result from an estimated 1 matches for "onepredecessor".

2005 Jun 17
5
[LLVMdev] Re: Control flow graph
...pplication with the llvm > infrastructure in terms of basic blocks? Yes, given a BasicBlock*, you can iterate over the pred/succ blocks in the CFG like this: #include "llvm/Support/CFG.h" for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) { BasicBlock *OnePredecessor = *PI; ... For successors, s/pred/succ/ > Is there any way of viewing the > Control flow graph of the application. Yes, use: analyze -print-cfg X.(bc|ll) or: analyze -print-cfg-only X.(bc|ll) These will emit "dot" files that can be turned into a variety of graphics...