通过User中提供的op_iterator迭代器来遍历Instruction中的操作数
Instruction* V = ...
for (User::op_iterator op = V->op_begin(), e = V->op_end(); op != e; ++op){
if (Instruction *U = dyn_cast<Instruction>(op->get())) {
...
}
}
通过User中提供的op_iterator迭代器来遍历Instruction中的操作数
Instruction* V = ...
for (User::op_iterator op = V->op_begin(), e = V->op_end(); op != e; ++op){
if (Instruction *U = dyn_cast<Instruction>(op->get())) {
...
}
}
本文标题:遍历LLVM IR指令的操作数
本文链接:https://www.haomeiwen.com/subject/ezurmqtx.html
网友评论