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

An Algebraic System-Based Cross-File Process Optimization Method

A technology of algebraic system and optimization method, applied in the field of compilers, can solve problems such as increased workload, inability to directly and effectively describe stack operations, complex function stack frames, etc., and achieve the best results

Inactive Publication Date: 2016-08-17
INST OF ACOUSTICS CHINESE ACAD OF SCI
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In this mode, since the maximum number of registers supported by the target machine is limited, and local temporary variables are distributed in multiple basic blocks due to the life cycle, frequent stacking, popping and local temporary register multiplexing will directly cause the function stack to Operation is redundant
[0004] The existing technology is mainly based on the optimization of the intermediate language under the compilation framework, and it mainly faces the following main problems: 1. The formulation of the function stack framework protocol is directly related to the target machine, and the amount of code involved in the modification is very large, which will lead to The workload has increased rapidly; 2. It is very complicated to formulate a function stack frame suitable for various application scenarios, which involves multiple stages such as register allocation, and the intermediate language is only an abstract language, which cannot directly and effectively describe the stack operation, so the design complexity of optimizing from the intermediate language is high

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
  • An Algebraic System-Based Cross-File Process Optimization Method
  • An Algebraic System-Based Cross-File Process Optimization Method
  • An Algebraic System-Based Cross-File Process Optimization Method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0016] The technical solutions of the present invention will be further described in detail below through the accompanying drawings and embodiments.

[0017] The algebraic system in the linear space consists of a non-empty set S and a set of algebraic symbols defined on the set S, and a relational set. The algebraic expressions used for inference calculations in the algebraic system consist of constants, variables, and a finite number of related algebraic operations ( Addition, subtraction, multiplication, etc.) constitute. The execution path in the assembly function can be regarded as an ordered tuple composed of multiple assembly-level basic blocks, assuming there is an execution path L= , Where L[i]=xi{i=1,...,n is the execution node or assembly-level basic block along the road}, the function can be defined for the characteristics of L:

[0018]

[0019] For a certain input L[i], the value of Ret(L[i]) is determinable, then the execution information of L can be recursively 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
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a cross-file inter-process optimization method based on an algebraic system. The method includes the following steps: according to the characteristics of the target machine, select instructions related to stack operations and logic operations, construct an algebraic system, and provide these instructions with the algebraic system. Establish a mapping relationship; traverse the program call graph PCG from the program entrance, and judge whether the nodes connected by edges belong to different source files, if so, continue to the next step, otherwise continue to traverse PCG; start from the function call instruction and follow The control flow graph CFG in the current function starts to traverse the data dependency graph DDG, generates the algebraic expression of the instruction stack operation, and performs expression reduction; analyzes the pop operation of the subsequent node function, reads the constant value from it, and passes it on in sequence , optimize and calculate, and finally delete redundant instruction fragments. The invention effectively merges and releases the optimizeable part in the function stack frame. In addition, the present invention also achieves better effects in cross-file process optimization, constant propagation and constant calculation.

Description

Technical field [0001] The present invention relates to compiler technology, in particular to a cross-file process optimization method based on algebraic system. Background technique [0002] The function stack framework is a general protocol in the traditional compilation framework, and it is left to the user to define it in the binary interface (Application Binary Interface, ABI). When the function stack framework processes function calls, it saves temporary variables in temporary registers as much as possible according to the hardware resource constraints of the target machine, and the overflow part is pushed into the stack before the function body is executed, and accessed through storage The instruction performs stack operations, and releases the data in the function stack one by one after the function body is executed. [0003] In this mode, since the maximum number of registers supported by the target machine is limited, and local temporary variables are distributed in mult...

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/45
Inventor 朱浩王东辉洪缨
Owner INST OF ACOUSTICS CHINESE ACAD OF SCI
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