gcc phi结构体
来源:互联网 发布:机器猫tv软件 编辑:程序博客网 时间:2024/06/06 19:15
gcc phi结构体
phi是gcc中重要的数据结构类型,它主要用于ssa中的别名处理,本文主要讲述它的作用,相关数据结构体和核心处理函数
1.作用
phi主要用于别名处理,对于在ssa阶段中因为分支导致不确定具体是什么数据,采用phi.
2.主要数据结构
struct GTY(()) phi_arg_d { /* imm_use MUST be the first element in struct because we do some pointer arithmetic with it. See phi_arg_index_from_use. */ struct ssa_use_operand_d imm_use; tree def; location_t locus;};
phi结点主要有三部分,def描述其ssa_name,表示其本身代表的数据,locus表示其位置,imm_use是一个双向链表结构,phi利用这个可以实现phi的def-use的遍历.
imm_use的结构:
typedef struct GTY(()) ssa_use_operand_d { struct ssa_use_operand_d* GTY((skip(""))) prev; struct ssa_use_operand_d* GTY((skip(""))) next; /* Immediate uses for a given SSA name are maintained as a cyclic list. To recognize the root of this list, the location field needs to point to the original SSA name. Since statements and SSA names are of different data types, we need this union. See the explanation in struct immediate_use_iterator_d. */ union { gimple stmt; tree ssa_name; } GTY((skip(""))) loc; tree *GTY((skip(""))) use;} ssa_use_operand_t;
可以把它理解为一个数据的def-use链接结构.其中use表示应用它的的tree,stmt,ssa_name表示本身的数据属性,prev,next表示双向链表.这个结构就是为了可以找到该数据def的use遍历.每个这个类型的数据其实就表示该定义数据的一个use结点.
常用的phi函数:
gimple_phi_num_args (const_gimple gs)gimple_phi_result (const_gimple gs)gimple_phi_set_result (gimple gs, tree result)gimple_phi_arg (gimple gs, unsigned index)
0 0
- gcc phi结构体
- gcc结构体对齐
- 【phi】
- gcc c 关于结构体对齐
- Mingw-gcc结构体取消对齐
- ARM gcc 结构体对应的选项
- gcc结构体对齐的误用
- GCC结构体与G++结构体的区别
- GCC结构对齐小结
- gnu/gcc目录结构
- Arm结构体gcc内存边界对齐问题(zt)
- gcc 中结构体(struct)内存对齐问题分析
- gcc内联汇编将结构体成员清零
- linux gcc 如何计算结构体的大小
- GCC如何处理函数返回一个结构体
- gcc 中的"__attribute__ ((packed))" gcc移植,内存对齐.结构体对齐
- gcc 中的"__attribute__ ((packed))" gcc移植,内存对齐.结构体对齐-转
- polya +phi
- 使用ViewFlipper实现屏幕滚动切换动画
- Oracle 11g 新特性 --SQL Plan Management 说明
- 利用Java编写简单的WebService实例
- [sersync] github镜像 二进制包
- 精度(Precision)与召回率(Recall) 以及ROC曲线
- gcc phi结构体
- 确实进程内部运行线程情况
- linux expr命令参数及用法
- 一种一致性HASH算法的实现方法,附核心代码
- Guice 学习(一)永远的 Hello World
- 当工作累了,看看这个
- android中 include标签的使用,以及xUtils处理 include的方式
- iOS自动布局-Auto Layout
- 一个模仿布卡那样的划动手势看在线漫画的简单应用DEMO