LLVM compiler-oriented RISC-V program vectorization optimization method and system

By combining high-level languages, inline assembly language and assembly language for manual vectorization optimization, and using LLVM compiler for automatic vectorization optimization, the problem of insufficient flexibility and applicability of RISC-V program vectorization optimization is solved, and the problem of insufficient flexibility and applicability of RISC-V program vectorization optimization is achieved. Efficient and flexible vector optimization solution, suitable for a variety of application scenarios and data types.

CN119002872APending Publication Date: 2024-11-22SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202310568076.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-18
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The existing vector optimization technology has insufficient flexibility and applicability when processing RISC-V target programs. In particular, OpenACC cannot handle dynamic memory allocation. Intel AVX and CUDA can only run on specific hardware platforms, which limits their application scenarios. and the applicability of data types.

Method used

Adopt RISC-V program vectorization optimization method for LLVM compiler, combine high-level language, inline assembly language and assembly language for manual vectorization optimization, and use LLVM compiler for automatic vectorization optimization, integrating manual and automatic optimization results. Provide comprehensive vectorized solutions.

Benefits of technology

It improves the performance and efficiency of the program, can complete more calculations within the same time, is suitable for different application scenarios and data types, reduces programmers' workload, and enhances the flexibility and scalability of vectorized optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119002872A_ABST
    Figure CN119002872A_ABST
Patent Text Reader

Abstract

The invention discloses an LLVM compiler-oriented RISC-V program vectorization optimization method and an LLVM compiler-oriented RISC-V program vectorization optimization system. The method comprises the steps that a high-level language, an inline assembly language and an assembly language are utilized, manual vectorization optimization is controlled from different levels for a target RISC-V program, a first vector optimization result is obtained, and an assembly instruction is directly embedded into the high-level language through inline assembly; performing automatic vectorization optimization by using an LLVM compiler, and inserting a vectorization instruction based on the loop structure information to obtain a second vector optimization result; and for the target application scene and the target data type, integrating the first vector optimization result and the second vector optimization result to obtain an overall vectorization optimization result. According to the method, a comprehensive vectorization optimization solution is provided for the RISC-V platform, and more calculations can be completed within the same time, so that the performance and efficiency of a program are improved.
Need to check novelty before this filing date? Find Prior Art

Citation Information

Cited By

  • Compiler optimization option prediction method, storage medium, electronic device and computer program product

    CN120578393A

  • RISC-V and TPU heterogeneous code optimization use method based on machine learning

    CN121255194A

  • A method for heterogeneous code optimization of RISC-V and TPU based on machine learning

    CN121255194B