【发布时间】:2016-04-18 19:56:41
【问题描述】:
在 LLVM 中,BasicBlock 具有属性 getSinglePredecessor() 和 getSingleSuccessor(),但我需要获取基本块的后继和前驱的完整列表。如何在 llvm 中实现这一点?
我的代码是
virtual bool runOnFunction(Function &F) {
for (Function::iterator b = F.begin(), be = F.end(); b != be; ++b) {
//Here I need to get the predecessor and successsor of the basic block b
}
}
【问题讨论】:
标签: compiler-construction llvm compiler-optimization llvm-clang