首页 > 其他 > 详细

LLVM程序分析日记之unique predecessor/successor

时间:2021-01-30 17:49:33      阅读:43      评论:0      收藏:0      [点我收藏+]

查看LLVM BasicBlock类的文档时,发现了一些有意思的成员函数

BasicBlock *getSingleSuccessor () const
 	Return the successor of this block if it has a single successor. More...

BasicBlock *getUniqueSuccessor () const
 	Return the successor of this block if it has a unique successor. More...

我们主要疑惑于其中"Unique"的含义。在查阅源码注释后,基本得到了解答:

/// Note that unique predecessor doesn‘t mean single edge, there can be
/// multiple edges from the unique predecessor to this block (for example a
/// switch statement with multiple cases having the same destination).

LLVM程序分析日记之unique predecessor/successor

原文:https://www.cnblogs.com/bjchan9an/p/14348441.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!