LLVM Language Reference Manual---阅读笔记

文档地址:http://llvm.org/docs/LangRef.html

LLVM IR的标示符有两种基本类型,全局的和局部的。全局标示符以@开头,局部标示符以%开头。LLVM IR的标示符有三种形式:命名的,未命名的,常量。

每一个Moudule都是由函数、全局变量和符号表组成的。
全局变量表现为指向为一块内存的指针。
全局变量和函数都会有一个linkage type, 就像:private, internal, linkonce等。
一个函数的声明只能使用external, dellimport, extern_weak这三种linkage type.
引用(aliases)只能使用external, internal, weak, weak_odr这四种linkage type.
Calling Converntions
所有的全局变量和函数都有一个visibility styles: default, hidden, protected.
Named Types:
Note that type names are aliases for the structural type that they indicate, and that you can therefore specify multiple names for the same type. This often leads to confusing behavior when dumping out a .ll file. Since LLVM IR uses structural typing, the name is not part of the type. When printing out LLVM IR, the printer will pick  one name  to render all types of a particular shape. This means that if you have code where two different source types end up having the same LLVM type, that the dumper will sometimes print the "wrong" or unexpected type. This is an important design point and isn't going to change.

随手记得一些东西,没有仔细的总结和分析,后续有时间的话进行总结。

转载于:https://www.cnblogs.com/ainima/archive/2012/10/15/6332011.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值