IP Library Granted Patent US 11,662,988
Granted Patent B2
US 11,662,988 · App. 17/037,487 · Granted May 30, 2023

Compiler for RISC processor having specialized registers

Inventor: Jaehoon Heo (San Diego, CA)
Assignee: SHENZHEN GOODIX TECHNOLOGY CO., LTD.
G06F8/441G06F9/30098
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,662,988
App. No.
17/037,487
Granted
May 30, 2023
Kind
B2
Abstract

A compiler is disclosed. The compiler is configured to generate executable code based on source code, where the source code includes a plurality of variables. The compiler includes an executable code generator configured to allocate a register to each of the source code variables, where the executable code generator is configured to select one of a group of register types to be allocated for each variable, and where the allocated register of each variable corresponds with the determined register type determined therefor.

Claims (32)

1. A compiler configured to generate executable code based on source code for execution on a processor having a plurality of registers of a group of register types, wherein each register of a first register type has a first number of read and write ports, and each register of a second register type has a second number of read and write ports less than the first number of read and write ports, wherein the source code comprises a plurality of variables each having a respective usage in context of a programming loop of the source code,

the compiler comprising an executable code generator configured automatically to allocate one of the plurality of registers to each of the source code variables,

wherein the executable code generator is configured to select one of a group of register types to be allocated for each variable, by: selecting the first register type to be allocated for a first variable of the plurality of variables based on the first variable having a respective usage previously associated with the first register type; selecting the second register type to be allocated for a second variable of the plurality of variables based on the second variable having a respective usage previously associated with the second register type; and selecting the second register type to be allocated for a third variable of the plurality of variables based on the third variable having a respective usage previously associated with the first register type but determined to be supportable by the second number of read and write ports of the second register type, and

wherein the allocated register of each variable corresponds with the determined register type determined therefor.

2. The compiler of claim 1 , wherein the group of register types comprises:

a set of general purpose registers grouped as a first register file, and

a set of specialized registers grouped as a second register file.

3. The compiler of claim 1 , wherein the executable code generator is configured to select the register type to be allocated for each variable by determining how many read and write ports the register allocated to each variable will need when executed.

4. The compiler of claim 1 , wherein the executable code generator is configured to select the register type to be allocated for each variable by determining which of the register types accommodate execution time needs for each variable.

5. The compiler of claim 1 , wherein the executable code generator is configured to receive intermediate code generated by the compiler, wherein selecting the register type to be allocated for each variable comprises determining how the variable is used in the intermediate code.

6. The compiler of claim 5 , wherein the executable code generator is configured to select the register type to be allocated for each variable by determining which of the register types accommodate execution time needs for each variable.

7. The compiler of claim 6 , wherein the executable code generator is configured to select the register type to be allocated for a particular variable by determining that more than one register type accommodates the execution time needs of the particular variable.

8. The compiler of claim 7 , wherein the executable code generator is configured to select the register type to be allocated for a particular variable by selecting one of the register types that accommodate the execution time needs of the particular variable based on the selected register type requiring less power to operate than other register types that accommodate the execution time needs of the particular variable.

9. The compiler of claim 7 , wherein the executable code generator is configured to select the register type to be allocated for a particular variable by selecting one of the register types that accommodate the execution time needs of the particular variable based on preserving an unused state of a register file having registers of one of the register types that accommodate the execution time needs of the particular variable.

10. The compiler of claim 1 , wherein the executable code generator is further configured to allocate registers of a first register type to variables determined for the first register type as a first register allocation problem, and to allocate registers of a second register type to variables determined for the second register type as a second register allocation problem.

11. A method of using a compiler to generate executable code based on source code for execution on a processor having a plurality of registers of a group of register types, wherein the source code comprises a plurality of variables each having a respective usage in context of a programming loop of the source code, the method comprising:

with an executable code generator, selecting one of the group of register types to be allocated for each variable, wherein each register of a first register type has a first number of read and write ports, and each register of a second register type has a second number of read and write ports smaller than the first number of read and write ports, the selecting comprising:

selecting the first register type to be allocated for a first variable of the plurality of variables based on the first variable having a respective usage previously associated with the first register type;

selecting the second register type to be allocated for a second variable of the plurality of variables based on the second variable having a respective usage previously associated with the second register type; and

selecting the second register type to be allocated for a third variable of the plurality of variables based on the third variable having a respective usage previously associated with the first register type but determined to be supportable by the second number of read and write ports of the second register type; and

with the executable code generator, automatically allocating one of the plurality of registers to each of the source code variables, wherein the allocated register of each variable corresponds with the determined register type determined therefor.

12. The method of claim 11 , wherein the group of register types comprises:

a set of general purpose registers grouped as a first register file, and

a set of specialized registers grouped as a second register file.

13. The method of claim 11 , wherein selecting the register type to be allocated for each variable comprises determining how many read and write ports the register allocated to each variable will need when executed.

14. The method of claim 11 , wherein selecting the register type to be allocated for each variable comprises determining which of the register types accommodate execution time needs for each variable.

15. The method of claim 11 , further comprising, with the executable code generator, receiving intermediate code generated by the compiler, wherein selecting the register type to be allocated for each variable comprises determining how the variable is used in the intermediate code.

16. The method of claim 15 , wherein selecting the register type to be allocated for each variable comprises determining which of the register types accommodate execution time needs for each variable.

17. The method of claim 16 , wherein selecting the register type to be allocated for a particular variable comprises determining that more than one register type accommodates the execution time needs of the particular variable.

18. The method of claim 17 , wherein selecting the register type to be allocated for a particular variable comprises selecting one of the register types that accommodate the execution time needs of the particular variable based on the selected register type requiring less power to operate than other register types that accommodate the execution time needs of the particular variable.

19. The method of claim 17 , wherein selecting the register type to be allocated for a particular variable comprises selecting one of the register types that accommodate the execution time needs of the particular variable based on preserving an unused state of a register file having registers of one of the register types that accommodate the execution time needs of the particular variable.

20. The method of claim 11 , further comprising, with the executable code generator, allocating allocate registers of a first register type to variables determined for the first register type as a first register allocation problem, and allocating registers of a second register type to variables determined for the second register type as a second register allocation problem.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 25, 2021
From: GOODIX TECHNOLOGY INC.
To: SHENZHEN GOODIX TECHNOLOGY CO., LTD.
Reel/Frame 055011/0720 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 6, 2020
From: HEO, JAEHOON
To: GOODIX TECHNOLOGY INC.
Reel/Frame 053983/0460 →
Continuity (1)
Related Publication 20220100483A1 · Mar 31, 2022