[LLVMdev] examine dominating relationships between basic blocks

Chuck Zhao czhao at eecg.toronto.edu
Fri Jan 14 08:06:27 PST 2011


I am building code which needs to examine dominating relationships 
between Basic Blocks.
I searched the Programming Guide 
(http://llvm.org/docs/ProgrammersManual.html#common), it mentioned 
briefly that such details will be covered in the future.

So, I am tuning to the list and ask.

Say, I have BasicBlock * a, *b, and need to know whether a DOM b, (a 
DOMi b, a DOMp b, a PostDOM b), etc.
How can these be expressed?

Similar things,
how can I find all BasicBlocks that a dominates, (DOM, DOMp, PostDOM, ...)

Browsing the source code, I seem to find things like DominatorFrontier, 
DominatorTree, etc.
But I have no clue how they can be used.

Can somebody leverage some more details please.


Thank you

Chuck




More information about the llvm-dev mailing list