有谁知道如何在 LLVM 3.5 中遍历支配树?我可以使用 DominatorTree *DT = &getAnalysis<DominatorTreeWrapperPass>(F).getDomTree();
检索 DOM 树.但是,我不确定如何遍历它。有什么想法吗?
最佳答案
这里的“遍历”是什么意思? DominatorTree
有一些有用的调用,例如 dominates
、getDescendants
和 isReachableFromEntry
。请注意,它也派生自 DominatorTreeBase
,因此您可能需要检查此类提供的方法。
有大量 DominatorTree
与 LLVM 本身一起使用的示例。
关于c++ - LLVM 3.5中如何遍历支配树?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29221976/