A Register Allocation Method Based on Area Priority

A register allocation and priority technology, applied in the direction of machine execution devices, etc., can solve problems such as high time pressure and inapplicability of real-time compilers, and achieve the effect of avoiding time and space consumption

Inactive Publication Date: 2015-08-19
THE PLA INFORMATION ENG UNIV
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

But these methods usually face large time pressure and are not suitable for just-in-time compilers

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
  • A Register Allocation Method Based on Area Priority
  • A Register Allocation Method Based on Area Priority

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0047] The register allocation method based on region priority consists of the following steps:

[0048] Step 1: Transform the register allocation problem into a kind of matrix filling;

[0049] Step 2: Design a greedy filling method, and use this greedy filling method to fill an empty matrix into a non-empty matrix that meets the requirements; the greediness of this greedy filling method exists in dividing the loop area and building length priority In the process of queuing in level queue and overflow weight priority;

[0050] Step 3: Realize register allocation according to the filling in step 2.

[0051] When carrying out the work of described step 1, at first define following noun:

[0052] Instruction number: Instruction number x refers to the number of each instruction in the program segment (1≤x≤N, N represents the last instruction number of the program); the order of instructions in the basic block is fixed, and the order of instructions between basic blocks is arbi...

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 relates to a register allocation method based on the regional priority, which particularly comprises the following steps: step 1, a register allocation problem is switched into a matrix filling model; step 2, a greedy type filling method is designed and is used for changing an empty matrix into a non-empty matrix by filling; the greed of the greedy type filling method exists in the processes of dividing a circulating region and creating a length priority queue and overflow weight priority queue area; step 3, the register allocation is realized according to the filling in the step 2, and particularly comprises the following four steps: step 3.1, regional division and variable life domain interval splitting are performed; step 3.2, length and overflow weight priority queue creation is performed; step 3.3, register allocation is performed; step 3.4, register destruction is performed. The invention provides a register allocation method based on the regional priority, which has fast allocation speed and high quality of generating codes.

Description

(1) Technical field: [0001] The invention relates to a method for allocating registers, in particular to a method for allocating registers based on area priority. (two), background technology: [0002] The register allocation stage determines whether the variables in the intermediate representation of the program are allocated to registers or to memory, and is one of the most basic and important stages of the compiler. The pursuit of high-quality generated code has always been the primary goal of register allocation, but with the development of just-in-time compilers, the speed of register allocation has also become an important factor to measure compiler performance. The traditional register allocation methods are mainly linear scanning algorithm and graph coloring method, both of which cannot meet the high requirements of code quality and allocation speed at the same time. The linear scan algorithm allocates physical registers to the life domain by sequentially traversing...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/30
Inventor 庞建民单征刘晓楠岳峰金久真梁光辉
Owner THE PLA INFORMATION ENG UNIV
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