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

C program compiling method and C program compiler

A program compilation and compiler technology, applied in program control design, instruments, memory systems, etc., can solve the problems of more time-consuming, time-consuming back-end stages, and slow speed, so as to speed up, improve compilation efficiency, reduce The effect of compile time

Active Publication Date: 2015-07-01
SHANGHAI EASTSOFT MICROELECTRONICS
View PDF8 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

As the scale and complexity of user C programs continue to increase, the compilation process will take more time
[0003] In the prior art, both intermediate code optimization and object code generation are performed in units of C program files, and each function in the file needs to be processed one by one, which is very slow, resulting in a very time-consuming back-end stage in the compilation 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
  • C program compiling method and C program compiler
  • C program compiling method and C program compiler
  • C program compiling method and C program compiler

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0021] figure 1 The schematic flow chart of the C program compiling method provided by the present invention, as figure 1 As shown, the method includes:

[0022] S101. The C program compiler sequentially performs lexical analysis, syntax analysis, semantic analysis and intermediate code generation on the C program.

[0023] It should be noted 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

An embodiment of the invention provides a C program compiling method and a C program compiler. The C program compiling method includes subjecting a C program to lexical analysis, grammatical analysis, semantic analysis and intermediate code generation sequentially, allocating the C program subjected to semantic analysis and intermediate code generation on at least two threads by taking functions as units so as to perform intermediate code optimization respectively; performing target code generation on the C program subjected to intermediate code optimization. The C program compiling method and the C program compiler have the advantage that time consumption in the rear-end phase can be reduced, so that C program compiling efficiency is improved.

Description

technical field [0001] The invention relates to the field of communication technology, in particular to a C program compiling method and a compiler. Background technique [0002] C language is widely used in the development of various system software, such as operating systems, compilers, embedded systems, parallel computing, etc. Therefore, C program compilers for various target machines emerge in endlessly. The function of the C program compiler is to convert the user's C program into a semantically equivalent target machine program. In the classic compilation architecture, the compilation process is usually divided into five serial modules, namely: lexical analysis, syntax analysis, semantic analysis and intermediate code generation, intermediate code optimization, and object code generation. Usually, the stages of lexical analysis, syntax analysis, semantic analysis and intermediate code generation are collectively referred to as the front end, and the stages of interme...

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 SHANGHAI EASTSOFT MICROELECTRONICS
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