Unlock instant, AI-driven research and patent intelligence for your innovation.

Algebraic calculus-based intermediate code optimization method

A code optimization and algebraic technology, applied in computing, electrical digital data processing, instruments, etc., can solve the problem of high compiler cost and achieve the effect of ensuring the scope of application

Active Publication Date: 2016-11-16
EAST CHINA NORMAL UNIV
View PDF3 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Different target platforms have different features, and the cost of developing a dedicated compiler for the target platform is often too 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
  • Algebraic calculus-based intermediate code optimization method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0039] This embodiment takes the optimization of LLVM intermediate language by applying the algebraic calculation-based intermediate code optimization method of the present invention as an example.

[0040] LLVM is a compiler architecture that supports multiple high-level languages, multiple target platforms, and multi-stage optimization. It follows the standard compiler process guidelines and is divided into three parts: high-level language front-end, intermediate code optimizer, and back-end object code generator. part. The LLVM front-end first converts the source program into an LLVM IR program, optimizes the LLVM IR program after a series of control flow and data flow analysis, and then generates the corresponding target code according to the specific target processor platform.

[0041] LLVM IR comes in three forms: compiler IR, bytecode IR written to a file, and IR as assembly language. These three representations are equivalent, and it is a different representation of t...

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 proposes an algebraic calculus-based intermediate code optimization method. The method comprises a high-level language conversion step, an optimization step and a target code generation step. In the high-level language conversion step, input source codes and intermediate language programs in other forms are converted into intermediate language programs used for the optimization method, wherein the intermediate languages in other forms refer to intermediate languages different from the intermediate languages used for the optimization method. In the optimization step, optimization policy customization is provided for a user, the user is allowed to provide hardware properties of a target platform, a special optimization policy is customized, and the intermediate languages in the high-level language conversion step are optimized by using the optimization policy to obtain optimized intermediate codes. In the target code generation step, executable machine codes of the target platform are generated by the optimized intermediate codes. According to the method, all input codes can be subjected to equivalent variation under the support of an algebraic rule based on formalized algebraic semantics; and the reasonability of the algebraic rule ensures the correctness of conversion.

Description

technical field [0001] The invention relates to the field of formalized semantics, in particular to an intermediate code optimization method based on algebraic calculus. Background technique [0002] The hardware of the embedded method is often customized according to the specific application. In order to obtain more software support, it is usually necessary to write a special compiler to complete the conversion from the high-level language to the specific target platform code, and at the same time meet the requirements of the embedded method for high performance, High reliability, low power consumption and other requirements. Different target platforms have different features, and the cost of developing a dedicated compiler for the target platform is often too high. The invention proposes an intermediate code method based on algebraic calculation, optimizes the intermediate code according to an optimization strategy that can be customized by users, and generates efficient ...

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
CPCG06F8/443
Inventor 黄滟鸿卜祥兴史建琦何积丰李昂方徽星
Owner EAST CHINA NORMAL UNIV