Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Activity analysis method and system for fine-grained variables in multi-beat instruction

A kind of activity analysis and fine-grained technology, applied in the direction of program code conversion, instrument, calculation, etc., can solve the problems of complex judgment process and complex instruction arrangement, and achieve the effect of wide application range

Active Publication Date: 2021-11-30
NAT UNIV OF DEFENSE TECH
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

At the same time, during the compilation process, instruction scheduling and register allocation are often performed alternately multiple times. After assembly instructions are scheduled, the instruction arrangement will be more complicated, resulting in a more complicated judgment process.

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
  • Activity analysis method and system for fine-grained variables in multi-beat instruction
  • Activity analysis method and system for fine-grained variables in multi-beat instruction
  • Activity analysis method and system for fine-grained variables in multi-beat instruction

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0041] The intermediate language code generated by the compiler, the partially converted assembly code, or the assembly code that needs to be optimized is divided into basic blocks, and the active interval is also relative to the interval in the basic block. In addition to the start and end basic blocks, other basic blocks have exit and entry basic blocks, according to which variables that are retained and need to be preserved can be obtained. In the context of multiple beats in the instruction execution cycle, when analyzing each instruction, compare the operation mode and effective time of the current instruction and the last operation instruction on the variable, and cannot simply be retained based on "read after write" and "read after read". Variable liveness, remove variable liveness in case of "write after read" and "write after write".

[0042] Such as figure 1 As shown, the fine-grained variable activity analysis method in the multi-tick instruction in this embodiment...

Embodiment 2

[0060] This embodiment is a further improvement on Embodiment 1. In this example, steps A1) to A4) in Example 1 are recorded as activity analysis, while in this example, it is carried out, which is recorded as simplified activity analysis.

[0061] Due to the accurate active interval acquisition to find the corresponding updated interval, it will increase the positioning time in complex cases. On the other hand, since the start and effective time of the write operation lags behind the start execution time of the instruction, the complexity of the algorithm will be greatly increased when register allocation is performed. However, the variable activity saved from the start of instruction execution to the start of variable write operation is actually difficult to use when register allocation. Therefore, if there is no extreme requirement for the efficiency of register usage, the activity analysis can be simplified by replacing the start time of variable write operation with inst...

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 an activity analysis method and system for fine-grained variables in a multi-beat instruction. The operation modes and effective time of a current instruction and a last operation instruction on variables are compared when each instruction is analyzed under the background of multiple beats of an instruction execution cycle, variable activity is not simply reserved according to 'read after write' and 'read after read', an active interval is newly created in each write operation, an active interval with the interval left end point being smaller than the maximum value of the current beat needs to be found in each read operation, and the interval right end point is updated to be the beat with the current instruction read operation effective. Activity analysis of the fine-grained variables in the multi-beat instruction can be achieved, on the premise that the execution beat and the instruction arrangement sequence of the instruction are determined, activity intervals of all the variables are obtained by traversing all the basic blocks and all the instructions, the period of the variables occupying the register can be obtained through activity analysis, and a judgment basis is provided for distribution and release of registers in the compiler.

Description

technical field [0001] The invention relates to a compiler register allocation technology in a computer program compiler, in particular to a fine-grained variable activity analysis method and system in multi-tick instructions. Background technique [0002] In the field of compilation, in order to make full use of register resources and analyze the conflict relationship of variables, the compiler needs to obtain the active range / lifetime of variables through analysis before allocating registers to variables / operands in instructions. This process Called the activity analysis of variables. [0003] In the traditional architecture, due to resource conflicts, the next instruction can only be executed after one instruction is executed, so the execution of the instruction is always serial, and the execution cycle of the instruction is always designed or regarded as one beat. However, with the increasing diversification of architecture design, in order to make full use of various r...

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 Applications(China)
IPC IPC(8): G06F8/41
CPCG06F8/441
Inventor 陈照云马奕民文梅时洋孔玺畅扈啸王耀华孙海燕邓灿赵宵磊
Owner NAT UNIV OF DEFENSE TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products