一种基于位向量与可配置映射的寄存器选择方法

By using a bit vector and configurable mapping register selection method, the problems of low efficiency, high cost and insufficient scalability in existing register selection technologies are solved, realizing efficient and flexible register selection and highly adaptable compiler register allocation.

CN122111509BActive Publication Date: 2026-07-17成都融见软件科技有限公司 +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
成都融见软件科技有限公司
Filing Date
2026-04-27
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

In existing compilers, register allocation relies on a fixed order, which cannot be flexibly adjusted. Register category filtering is inefficient, register availability determination is costly, and scalability is insufficient, making it difficult to adapt to various target architectures and user preferences.

Method used

It adopts a register selection method based on bit vectors and configurable mapping. By performing bitwise operations on availability bit vectors and category masks, it quickly filters free registers that meet the target constraints. It achieves efficient selection by using bitwise detection of the first position and supports flexible register priority configuration and scalability.

Benefits of technology

It significantly improves register selection efficiency, reduces decision-making costs, and enables flexible register selection and good scalability, adapting to different platforms and architectures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122111509B_ABST
    Figure CN122111509B_ABST
Patent Text Reader

Abstract

本申请涉及编译器的寄存器分配领域,特别是涉及一种基于位向量与可配置映射的寄存器选择方法。其包括:获取可用性位向量和目标约束对应的类别掩码;所述可用性位向量中每一位对应一个寄存器;如果所述可用性位向量中0表示对应的寄存器空闲,1表示对应的寄存器已被占用,则对所述可用性位向量进行取反操作,并将进行取反操作后得到的向量与目标约束对应的类别掩码进行按位与运算,获取进行按位与运算得到的向量;对进行按位与运算得到的向量进行首位置位检测,将检测得到的第一个值为1的位编号对应的寄存器确定为选择的满足目标约束的空闲寄存器。本发明能够提高寄存器类别过滤效率和降低寄存器可用性的判定成本。
Need to check novelty before this filing date? Find Prior Art