Chapter09_代码生成.ppt
文本预览下载声明
Chapter Code Generation代码生成 8.1 Intermediate Code and Data Structures for Code Generation 中间代码和用于代码生成的数据结构 8.2 Basic Code Generation Techniques 基本的代码生成技术 8.3 Code Generation of Data Structure References 数据结构应用的代码生成 8.4 Code Generation of Control Statements and Logical Expressions 控制语句和逻辑表达式的代码生成 8.5 Code Generation of Procedure and Function Calls 过程和函数调用的代码生成 8.6 Code Generation in Commercial Compilers: Two Case Studies 商用编译器中的代码生成:两个案例研究 8.7 TM: A Simple Target Machine TM:简单的目标机器 8.8 Code Generation for the Tiny Language TINY语言的代码生成器 8.9 A Survey of Code Optimizations Techniques 代码优化技术考察 8.10 Simple Optimizations for the TINY Code Generator TINY代码生成器的简单优化 8.1 Intermediate Code and Data Structures for Code Generation 中间代码和用于代码生成的数据结构 ● intermediate representation ( IR) ● Three-Address Code ● example ● Data Structures for the Implementation of Three-Address Code 实现三地址码的数据结构 ● example ● example ● C code defining possible data structures for the quadruples 四元式的数据结构 8.2 Basic Code Generation Techniques 基本的代码生成技术 ● Practical Code Generation 8.3 Code Generation of Data Structure References 数据结构应用的代码生成 8.4 Code Generation of Control Statements and Logical Expressions 控制语句和逻辑表达式的代码生成 ● If Statements ● While Statements 8.5 Code Generation of Procedure and Function Calls 过程和函数调用的代码生成 ● example ● example 8.6 Code Generation in Commercial Compilers: Two Case Studies 商用编译器中的代码生成:两个案例研究 8.7 TM: A Simple Target Machine TM:简单的目标机器 8.8 Code Generation for the Tiny Language TINY语言的代码生成器 8.9 A Survey of Code Optimizations Techniques 代码优化技术考察 ● 优化技术简介—(a)常数合并 a = 10 * 5 + 6 - b; _tmp0 = 10 ; _tmp1 = 5 ; _tmp2 = _tmp0 * _tmp1 ; _tmp3 = 6 ; _tmp4 = _tmp2 + _tmp3 ; _tmp5 = _tmp4 – b; a = _tmp5 ; 优化技术简介—(b)常数传播 _tmp4 = 0 ; f0 = _tmp4; _tmp5 = 1 ; f1 = _tmp5; _tmp6 = 2 ; i = _tmp6 ; f0 = 0 ; f1 = 1 ; i = 2 ; 优化技术简介—(c)代数简化 x+0 = x 0+x = x x*1 = x 1*x = x 0/x = 0 x-0 = x 优化技术简介—代数简化 _tmp0 = 5 ; _tmp1 = _tmp0 + a ; _tmp2 = _tmp1 + 10 ; b = _tmp2 ;
显示全部