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

Access optimization compiling method and device for functions

A compiling method and memory access technology, which is applied in the computer field, can solve problems such as the unsatisfactory effect of the total number of instructions and the low efficiency of target register loading.

Active Publication Date: 2016-12-07
LOONGSON TECH CORP
View PDF3 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The present invention provides a function memory access optimization compiling method and device, which are used to solve the unsatisfactory effect of reducing the total number of instructions in the function sequence or function postscript in the prior art, and the storage efficiency of storing data from the source register to the memory is low or low. Technical problem with inefficient loading of data from memory to target registers

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
  • Access optimization compiling method and device for functions
  • Access optimization compiling method and device for functions
  • Access optimization compiling method and device for functions

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 7

[0149] S701: The compiler arranges the N registers that need to be saved in the type according to the numbers from small to large, and obtains a sequentially numbered register sequence.

[0150] Specifically, the register sequence is

[0151] S702: The compiler judges whether the offset of each register of this type relative to the stack base address register sp is 16-byte aligned. If yes, execute S703; if not, execute S706.

[0152] S703: The compiler judges whether the N can divide the quotient of the memory access width of the above-mentioned vector memory access instruction divided by the width of the register of this type (the quotient value is 2), that is, judges whether the above-mentioned N is an even number. If yes, execute S704, and if not, execute S705.

[0153] S704: If it is divisible (that is, N is an even number), then the compiler groups the N registers numbered in the above order to obtain the first register group, and the number of registers in the first ...

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 provides an access optimization compiling method and device for functions. The method comprises the following steps of: grouping the same type of registers related to a function series or a function sequence of a to-be-compiled function by a compiler according to widths of the same type of registers and an access width of a vector access instruction in a target processor, so as to obtain register groups, and determining a type of an intermediate code corresponding to each register group according to the number of registers in each register group; if the type of the intermediate code corresponding to the register group is an intermediate code in a vector form, generating a fist intermediate code in the vector form for the register group; and generating a first assembly code by the compiler according to the first intermediate code, and outputting the first assembly code to the target processor. According to the method provided by the embodiments of the invention, the quantity of instructions in the function series or function sequence is greatly decreased, the space for storing the instructions is saved, the access efficiency of a computer is improved and the pressure of the registers is decreased.

Description

technical field [0001] The invention relates to computer technology, in particular to a function memory access optimization compiling method and device. Background technique [0002] There are a large number of function calls in high-level language programs, and the sequence and postscript of functions are indispensable code fragments for realizing function calls. The function sequence (Prologue) is responsible for establishing the stack space and saving the registers to be saved in the stack space, and the function epilogue (Epilogue) is responsible for restoring the above-mentioned saved registers from the stack space and destroying the stack space. Studies have shown that in several typical programs compiled under the MIPS instruction set, the number of instructions in the function prologue or function postscript accounts for about 4% to 25% of the total number of dynamic instructions, and most of the instructions in the function prologue or function postscript are It is...

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 LOONGSON TECH CORP
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