Intermediate Language Based on Virtual Register

Author
HanDong
Advisor
LiYun
School
Southwest Jiaotong University
Major
Applied Computer Technology
Classification
TP311.52 Software Development
Degree
Master's thesis
Year
2009
Downloads
55
Citations
0

Request the full text

Abstract

In embedded system, inline assembly language is often used to increase the efficiency of embedded software instead of high-level language partly, but it is not so portable or readable. To resolve that problem, one kind of intermediate language based on virtual register called VR-IL is designed with some concept and design philosophy of the traditional intermediate language, and it can be mixed with high-level language just like inline assembly language. It can be translated to kinds of target machine languages. Using VR-IL, the disadvantages of inline assembly language are surmounted with nearly the same runtime efficiency. Essentially, the runtime efficiency is achieved with the price of space and runtime compiling cost.On the level of grammar, VR-IL is one kind of programming language based on C language functions, in other words, all VR-IL sentences are in the form of C function, and C function is the basic syntactical unit of VR-IL. On the level of semantics, the purpose of VR-IL program’s running is generating intermediate code, and according to role of code generation, VR-IL sentence is sorted into two sets: direct code generation sentence and auxiliary code generation sentence. The intermediate code presents the function of VR-IL.There is map relationship between VR-IL intermediate code and physical instruction, and VR-IL intermediate code consists of operation code and operand just like physical instruction which is called virtual instruction to be differentiated from physical instruction. Virtual instruction is used to mask the difference of different target architecture, and the converting from virtual instruction to physical instruction is done by the back end of runtime compiler. That can meet the requirement of the embedded system with several target architectures.The compiling process is divided into two parts, the first part is static compiling by high level compiler, after that the virtual instructions are generated by the compiled code. The second part is runtime compiling of the generated virtual instructions, and the output of the process is target machine code.A basically complete program language system is explained in this paper and some algorithms of modern compiler theory are implemented. In the end, the runtime comparison of VR-IL, C and ARM inline assembly language is carried out to illustrate the runtime advantage of VR-IL, and it also prove that the design goal is reached. The work done by the subject provides not only a solution to address the shortcomings of embedded assembly language but also a good reference value for the study of modern compiler theory.

Table of contents

Abstract 6-7 Abstract 7-11 Chapter 1 Introduction 11-18 1.1 research background and significance 11 -14 1.2 design Goals 14 1.3 VR-IL -time compiler framework 14-16 1.4 research priorities 16-17 <br / > 1.5 thesis organization 17-18 Chapter 2 intermediate language representation layer design 18-29 2.1 VR-IL grammar rules 18-20 2.2 VR-IL virtual instruction set design 20-25 2.2.1 VR-IL concept of virtual instruction 21 2.2.2 VR-IL virtual instruction operating number 21-22 2.2.3 VR-IL virtual instruction addressing 22-23 2.2.4 build VR-IL virtual instruction set 23 -25 2.3 VR-IL directly generate intermediate code statements 25-27 2.4 VR-IL auxiliary generate intermediate code statements 27-28 2.5 chapter Summary 28-29 Chapter 3 intermediate code storage layer design 29-36 3.1 VR-IL tree storage structure 29 3.2 virtual registers store structure 29-31 3.3 virtual instruction storage structure 31-33 3.4 basic block storage structure 33-34 3.5 IL-ICF storage structure 34-35 3.6 Summary 35-36 Chapter 4 analyzes the intermediate code optimization layer design 36-49 4.1 SSA value - using structural analysis 37-39 4.2 operand optimization 39-42 4.3 eliminate dead instruction optimization 42-43 4.4 φ function processing 43-44 4.5 control flow analysis 44-45 4.6 data flow analysis 45-47 4.7 value - using frequency calculation 47-48 4.8 Chapter Summary 48-49 Chapter 5 target code generation layer design 49-57 5.1 target program format 49 -53 5.1.1 register usage rules 50-51 5.1.2 data stack usage rules 51 5.1.3 parameter passing rules 51 -52 5.1.4 target program Structure 52-53 5.2 register allocation 53-55 5.3 machine instruction mapping 55-56 <br / > 5.4 Chapter Summary 56-57 Chapter 6 System functional testing and performance analysis 57-67 6.1 correctness test 57-58 <br / > 6.2 intermediate code optimization process analysis test 58-61 6.2.1 operands optimize test 58 6.2.2 remove dead instruction optimization test 58-60 6.2.3 φ function processing module test 60 6.2.4 data flow analysis module test 60-61 6.3 intermediate language performance test 61 -67 Summary and Outlook 67-69 Thanks 69-70 References 70-74 Appendix 1: VR- IL performance test 74-78 master's degree and research papers published during 78

Related dissertations

  1. The Research and Optimization of Digital Speech Codec Based on C55DSP
  2. The Research of Soft Plc Technology Based on Cortex-M3
  3. Design and Implementation for the Signal Detecting System in Railway Terminal Subsystem
    YangYang ·Lanzhou University ·2012 ·Master's thesis
  4. Research on Key Technologies of Malicious Code Binary Program Behavior Analysis
  5. Research on Control Flow Reconstruction of Multi-source Decompilation
    LiDan ·PLA Information Engineering University ·2013 ·Master's thesis
  6. Research on Technologies of Control Flow Reconstruction and Control Structure Recovery in Decompilation
  7. Abnormalities of the intermediate language code based on the mix design and Implementation
  8. H.264 Encoder Optimization Based on TMS320DM642
  9. A Modular Approach on Building Certified Software System
    GuoYu ·University of Science and Technology of China ·2007 ·Doctoral dissertation
  10. Authentication method based on the logical procedure in the development of High Confidence Software
    XiangSen ·University of Science and Technology of China ·2006 ·Doctoral dissertation
  11. On the Study of Natural Query Language Understanding in Computer
    ZhengFengBin ·Southwest Jiaotong University ·2004 ·Doctoral dissertation
  12. Research of Key Technologies on Decompilation
    ChenKaiMing ·Hefei University of Technology ·2004 ·Doctoral dissertation
  13. Research on the Representation and Application of Chinese Context in Chinese-English Machine Translation
  14. Certifying Concurrent Porgrams Using Transactional Memory
    LiLong ·University of Science and Technology of China ·2008 ·Doctoral dissertation
  15. Verification of Low-level Concurrent Code with Several Synchronization Mechanisms
    FuMing ·University of Science and Technology of China ·2009 ·Doctoral dissertation
  16. A Research on Binary-coded-fiber Sensor Detecting Liquid Level
    DuanJingBo ·Nanjing Forestry University ·2008 ·Master's thesis
  17. Research on Virtual Instruction Translation Technique and Implementation of Translator
  18. The Design and Implementation of an Assembly Simulator
    ShengXinYi ·Suzhou University ·2007 ·Master's thesis
  19. Research and Application of Formal Language in Report Systems
    GuoJianXing ·Shanghai Normal University ·2004 ·Master's thesis
  20. Research and Development of the Cross Compiler Based on GCC for Embedded System
    FengGang ·Zhejiang University ·2004 ·Master's thesis