Compiling method for optimizing allocation of register based on C*core processor and compiler

A technology of register allocation and compilation method, which is applied in the direction of electrical digital data processing, instruments, memory systems, etc., and can solve problems such as graph coloring

Active Publication Date: 2012-12-19
天津国芯科技有限公司
View PDF3 Cites 16 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, register allocation is n

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Compiling method for optimizing allocation of register based on C*core processor and compiler
  • Compiling method for optimizing allocation of register based on C*core processor and compiler
  • Compiling method for optimizing allocation of register based on C*core processor and compiler

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] The present invention will be further elaborated below in conjunction with accompanying drawing and example, as figure 1 As shown, the difference between the method adopted by the present invention and the prior art is that after the front-end processing of the program is carried out, whether there is a function call in the program is added to detect, if there is no function call, then the assembly instruction is directly output, if there is If the function is called, the function needs to be processed according to the detection result, and the allocation of the register is determined according to the processing result, and finally the assembly instruction is output.

[0021] with function

[0022]

[0023] After the compiler completes the front-end processing of the function, the function call detection unit detects whether there is a function call in the program, and when the function is detected, the function call is analyzed by the function parameter passing proc...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a compiling method for optimizing allocation of a register based on a C*core processor, wherein the method comprises the steps of further processing a medium code which is generated by a front end; and optimizing the allocation of a register according to the type, the quantity and the life cycle characteristic of a variable in a function. Furthermore, the invention discloses a compiler for the method. With the adoption of the technical scheme, the throwing action is reduced to the greatest extent while the register is allocated in the compiling process, the times of pushing and pulling the processor are reduced, and the efficiency of the processor to execute the code is improved.

Description

technical field [0001] The invention belongs to the field of computers, relates to an embedded system, in particular to a compiling method and a compiler for optimizing register allocation of a C*core processor. Background technique [0002] Register allocation is a method to improve program execution speed by allocating program variables to registers as much as possible. Registers are one of the most important issues in compiler optimization (good register allocation can improve program execution speed by more than 250%); it is also one of the hottest research areas in compiler theory. [0003] Registers are a small number of high-speed storage units located inside the processor (CPU). Registers are very different from memory: First, the number of registers is very small, and a register can be directly located by a few bits, so that a certain register can be directly specified in the instruction; while the memory space is large, the location of the memory is generally It ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F9/45
Inventor 兰光洋王忠海肖佐楠郑茳
Owner 天津国芯科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products