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
_______________________________________________
LLVM Developers mailing list
LLV...@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 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.
Hi Chuck,
You can get this by requiring the DominatorTree pass from your pass. There are lots of examples of this in lib/Transforms/Scalar for example,
-Chris