提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档

LLVMIR初探

  • 前言
  • 一、LLVMIR中的Value Use User的关系
  • 二、SDNode
    • 1.引入库
    • 2.读入数据
  • 总结

前言

提示:这里可以添加本文要记录的大概内容:

例如:随着人工智能的不断发展,机器学习这门技术也越来越重要,很多人都开启了学习机器学习,本文就介绍了机器学习的基础内容。


提示:以下是本篇文章正文内容,下面案例可供参考

一、LLVMIR中的Value Use User的关系


图示i32 %1 = add i32 %2, i32%3,定义了三个变量%1 , %2,%3 。图示展示了三个变量在代码层面的构成逻辑。

为了保证Value的可复用性。引入了User Use Value
User本质也是Value.

  • User代表输出时,User->hidden pointer指向了它的输入参数,这里用Use作为中介,再指向最终的数据Value
  • 如果某个Value被多次使用,那么一定有多个Use与之关联。UseNext、 Prev的构成了这些Use的链表。这某个Value 的UseList指向第一个Use。最后一个Use的Next指向这某个Value。

二、SDNode

1.引入库

代码如下(示例):

class SDNode {DebugLoc debugLoc;//source line information,记录原行信息unsigned short NumOperands;unsigned short NumValues;
private:friend class SelectionDAG;// TODO: unfriend HandleSDNode once we fix its operand handling.friend class HandleSDNode;/// Unique id per SDNode in the DAG.int NodeId = -1;/// The values that are used by this operation.SDUse *OperandList = nullptr;/// The types of the values this node defines.  SDNode's may/// define multiple values simultaneously.const EVT *ValueList;/// List of uses for this SDNode.SDUse *UseList = nullptr;/// The number of entries in the Operand/Value list.unsigned short NumOperands = 0;unsigned short NumValues;// The ordering of the SDNodes. It roughly corresponds to the ordering of the// original LLVM instructions.// This is used for turning off scheduling, because we'll forgo// the normal scheduling algorithms and output the instructions according to// this ordering.unsigned IROrder;/// Source line information.DebugLoc debugLoc;
class SDValue {friend struct DenseMapInfo<SDValue>;SDNode *Node = nullptr; // The node defining the value we are using.unsigned ResNo = 0;     // Which return value of the node we are using.get the index which selects a specific result in the SDNode

Value可以直接转为SDValue;
SDValue可以直接定向SDNode;
SDUse是核心,SDNode指明用的数据节点,SDValue->ResNo指明使用该数据节点中的哪一个结果。

2.读入数据

代码如下(示例):

data = pd.read_csv('https://labfile.oss.aliyuncs.com/courses/1283/adult.data.csv')
print(data.head())

该处使用的url网络请求的数据。


总结

提示:这里对文章进行总结:
例如:以上就是今天要讲的内容,本文仅仅简单介绍了pandas的使用,而pandas提供了大量能使我们快速便捷地处理数据的函数和方法。

最新文章

  1. 关于 Rocksdb 性能分析 需要知道的一些“小技巧“ -- perf_context的“内功” ,systemtap、perf、 ftrace的颜值
  2. php查找多个字符串替换,php 替换多个字符串
  3. urlencode使用场景
  4. cobbler一键部署centos7.4(脚本)
  5. Nginx基础数据结构分析-ngx_chain_t
  6. 具体数学:计算机科学基础:第2版
  7. 【重识 HTML + CSS】CSS 特性
  8. 基于Altium Designer的4层PCB板的绘制
  9. 驱动多个二相四线制步进电机的Proteus仿真
  10. 老李推荐:第8章2节《MonkeyRunner源码剖析》MonkeyRunner启动运行过程-解析处理命令行参数...
  11. Android TextView和EditText属性详解
  12. 计算机视觉有哪些商业用途​
  13. 带您了解虚拟换衣系统
  14. 国二c语言和南开100题,全国计算机二级C语言题库_南开100题.doc
  15. 网站服务器诊断分析,网站SEO优化诊断分析报告范文模板(一)
  16. 【每日一题】(D0723)strcpy 智能指针
  17. PVT(Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions)
  18. C++_008_数据结构_线性表_普通线性表
  19. 1MB,1GB,1TB等于多少字节或比特?(理解B与b的区别)
  20. 日期格式不一致问题处理

热门文章

  1. RBAC新解:基于资源的权限管理(Resource-Based Access Control)
  2. 不定积分知识结构图_大一上学期《高等数学》知识整理-第四章 不定积分
  3. 最新开放的.Co域名注册向导
  4. iOS字体 动态下载系统提供的多种中文字体
  5. 30.1lvs-adm与ipvsadm命令
  6. break跳出两个嵌套的for循环
  7. 香港四日,逛吃逛吃—16家地道美味全纪录+伴手礼推荐
  8. Java项目:基于java航空订票系统(计算机毕业设计)
  9. 前端工程师能够用很低的学习本钱来运用它完成常用的效劳端代码
  10. 智能优化算法:北方苍鹰优化算法-附代码