Intermediate representation IR processing method and apparatus, and related device

By translating the IR generated by different compilers into a unified second type of IR, the development cost and threshold problems caused by the differences in IR of different compilers are solved, and ecological interoperability between compilers and improvement of development efficiency is achieved.

CN119668614AActive Publication Date: 2025-03-21HUAWEI TECH CO LTD
5 Cites 0 Cited by

Patent Information

Application Number
CN202311225969.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-20
Publication Date
2025-03-21
Estimated Expiration
2043-09-20

AI Technical Summary

Technical Problem

There are large differences in the intermediate representation of IR in different compilers, which leads to developers who need to learn a variety of different types of IR when developing new compilation tools based on different compilers, which increases learning costs and technical thresholds.

Method used

Translated different types of IR into a unified second type of IR through multiple code mapping sets, allowing developers to develop new compilation tools only by learning one type of IR, and implement IR conversion between different compilers through the second type of IR.

Benefits of technology

It reduces the learning cost and technical threshold of developers, improves the efficiency of developing new compilation tools, and realizes ecological interoperability between different compilers.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The invention discloses an IR (Intermediate Representation) processing method, device and system and related equipment, and relates to the technical field of computers. A first IR of a first type generated by a first compiler is obtained, the first IR is obtained by compiling the source program, and a first code mapping set in the multiple code mapping sets is utilized to translate the first IR to obtain a second IR of a second type, the first code mapping set comprises a mapping relation between entity names in different types of IR and a mapping relation between code organization modes of different types of IR, different code mapping sets are used for translating different types of IR into a second type of IR, and finally the second IR is output and used for generating corresponding executable codes. Therefore, when a developer develops a new compiling tool based on different compilers, the developer does not need to learn different types of IR in different compilers, and only needs to learn the second type of IR, so that the learning cost of the developer can be reduced.
Need to check novelty before this filing date? Find Prior Art