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

Compiler optimization method based on vector interrupt

An optimization method and compiler technology, applied in the field of compiler optimization, can solve problems such as the inability to fully reflect the advantages of vector interrupts, and achieve the effects of reducing load/store operations, speeding up execution efficiency, and improving speed.

Active Publication Date: 2015-12-02
天津国芯科技有限公司
View PDF3 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

More importantly, when the interrupt service function is executed, as a function, the compiler will save the registers used by it that need to be saved. This is a repeated save operation with "save the interrupt scene", and the general flow of interrupt response cannot fully reflect the vector interrupt. The advantages

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
  • Compiler optimization method based on vector interrupt
  • Compiler optimization method based on vector interrupt
  • Compiler optimization method based on vector interrupt

Examples

Experimental program
Comparison scheme
Effect test

example 1

[0070] Example 1: The interrupt service function is empty, compare the advantages of using the optimizing compiler optimization method compared with the traditional compiler traditional method.

[0071] First, if Figure 5 As shown, describe the interrupt execution program according to the general interrupt flow. Here, "ldu" indicates the instruction to fetch data from the memory and update the stack pointer; "stu" indicates the instruction to store data into the memory and update the stack pointer; " bl" means the instruction of the jump operation with the link register; "rfi" means the instruction returning to the interrupt site; "jump" means the jump instruction.

[0072] Here, ordinary compilers can only save "passable function registers" for any function, so it is necessary to add "save interrupt scene", "jump interrupt service function", "restore interrupt scene", "return interrupt scene" realized by assembly.

[0073] Describe the interrupt execution program and the in...

example 2

[0077] Example 2: The interrupt service function calls a sub-function, and compares the advantages of using the optimization method of the optimized compiler compared with the traditional method of the traditional compiler.

[0078] The interrupt service function is non-empty, the interrupt function needs to use "registers across functions", and the interrupt service function has sub-functions. Define the interrupt service function as follows:

[0079] __attribute__((interrupt())voidisr(void);

[0080] Compare Figure 7 , Figure 8 It can be seen that using an optimized compiler can reduce (2+1+2+10) "stores", 2 special register-related operations, 1 general-purpose register-related operation, 2 parameter register-related operations, and 10 cross-function Register-related operations; (2+1+2+10) "load", 2 special register-related operations, 1 general-purpose register-related operation, 2 parameter register-related operations, 10 cross-function register-related operations, r...

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 a compiler optimization method based on vector interrupt. The method comprises the steps that defining of vector interrupt functions is completed through preprocessing instructions; a compiler identifies the vector interrupt functions in the pre-compilation stage and analyzes use conditions of general registers in the interrupt functions; the general registers which need to be preserved and the preservation sequence of the general registers are determined; interrupt spots especially special registers which need to be preserved are determined; the registers are restored according to the preservation sequence of the registers, and the interrupt spots are restored; return of service functions is interrupted. According to the compiler optimization method based on the vector interrupt, the interrupt spots are preserved in the interrupt service functions,the conditions of the general registers used by the interrupt service functions are considered, operations of load / store are reduced, the process is simplified, the situations which relate to two skip operations of skipping to the interrupt service functions and returning from the interrupt service functions are reduced, therefore, the execution efficiency of the interrupt functions is accelerated, and the interrupt response speed of a processor is increased.

Description

technical field [0001] The invention belongs to the field of compiler optimization, and in particular relates to a vector interrupt-based compiler optimization method. Background technique [0002] A compiler is a computer program that converts source code (source language) written in a high-level programming language into another programming language (target language). The compiler is divided into the front-end, middle-end and back-end from the structure. The front-end is mainly the lexical analysis and syntax analysis stages. The assignment tree generated by the front-end is used as input and provided to the middle-end as input. The middle-end includes intermediate code generation and optimization. Code, the intermediate code generated by the middle end is used as output, which is provided to the back end as input, and the back end compiles the intermediate code into assembly code. [0003] Interrupts are the most common way for a processor to respond to peripheral reques...

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): G06F9/45
Inventor 王勇肖佐楠郑茳
Owner 天津国芯科技有限公司