← Back to Patent Explorer
EP0373361A2 Expired / Lapsed EP ⏱️ 0.0 years remaining

Generating efficient code for a computer with dissimilar register spaces

Assignee: International Business Machines Corp
•
Filing: 1989-11-08
•
Granted: —
•
Expires: 2009-11-08
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract A compiler generates compiled object code from source code of a computer program in a manner that produces efficient object code for a computer with dissimilar register spaces. The technique comprising the steps of generating code that references symbolic registers in which the register class is not distinguished, making entries in a table denoting the context in which each symbolic register occurs and constructing an equivalence tree of symbolic registers for move instructions assigned to a same equivalence class, for each equivalence class, forming the logical OR function of register usage information for all symbolic registers in the class, and for each symbolic register that appears in more than one register space context, generating new symbolic register numbers so that there is one number for each register space, and storing the numbers in said table, and if a definition point of a symbolic register is encountered and that symbolic register is used in more than one register space context, inserting code in said program to either do the same operation as is done at the definition point in each register space or move a value in the symbolic register from one space to another. The improvement achieved is in object code space and time of execution.

Inventors

  • 👤 Martin Edward Hopkins
  • 👤 Henry Stanley Warren, Jr.

Bibliographic Details

Application Number —
Jurisdiction EP
Data Source google_patents
Last Synchronized 2026-11-02 15:51
CPC Classifications
G; G06; G06F; G06F8/00; G06F8/40; G06F8/41; G06F8/44; G06F8/441

Claims Analysis

Total Claims: 10
Claim 1
Independent Claim 214 words
In a compiler which generates compiled object code from source code of a computer program, a computer performed method of generating efficient object code for a computer with dissimilar register spaces comprising the steps of: generating by a computer code that references symbolic registers in which the register class is not distinguished (2); making entries in a table by the computer denoting the context in which each symbolic register occurs and constructing an equivalence tree of symbolic registers for move instructions assigned to a same equivalence class (11); for each equivalence class, forming by the computer the logical OR function of register usage information for all symbolic registers in the class, and for each symbolic register that appears in more than one register space context, generating by the computer new symbolic register numbers so that there is one number for each register space, and storing the numbers in said table (12); and if a definition point of a symbolic register is encountered and that symbolic register is used in more than one register space context, inserting by the computer code in said program to either do the same operation as is done at the definition point in each register space or move a value in the symbolic register from one space to another (13).
Claim 2
Dependent Claim 214 words
In a compiler which generates compiled object code from source code of a computer program, a computer performed method of generating efficient object code for a computer with dissimilar register spaces comprising the steps of: generating by a computer code that references symbolic registers in which the register class is not distinguished (2); making entries in a table by the computer denoting the context in which each symbolic register occurs and constructing an equivalence tree of symbolic registers for move instructions assigned to a same equivalence class (11); for each equivalence class, forming by the computer the logical OR function of register usage information for all symbolic registers in the class, and for each symbolic register that appears in more than one register space context, generating by the computer new symbolic register numbers so that there is one number for each register space, and storing the numbers in said table (12); and if a definition point of a symbolic register is encountered and that symbolic register is used in more than one register space context, inserting by the computer code in said program to either do the same operation as is done at the definition point in each register space or move a value in the symbolic register from one space to another (13).
Claim 3
Dependent Claim 60 words
The method of generating efficient object code for a computer as recited in claim 1 wherein said step of making entries in a table (11) further comprises the step of checking by the computer each instruction to determine if it is a move register instruction (17), and if so, putting source and target registers in a same equivalence class (18).
Claim 4
Dependent Claim 60 words
The method of generating efficient object code for a computer as recited in claim 1 or 2 wherein said step of making entries in a table (11) further comprises the step of checking by the computer each instruction to determine if it is a conditional branch instruction (19), and if so, noting a conditional register context for that register (20).
Claim 5
Independent Claim 61 words
The method of generating efficient object code for a computer as recited in one of claims 1 to 3 wherein said step of making entries in a table (11) further comprises the step of checking by the computer each instruction to determine if it is a compare instruction (21), and if so, noting a conditional register context for that register (22).
Claim 6
Independent Claim 67 words
The method of generating efficient object code for a computer as recited in one of claims 1 to 4 wherein the step of making entries in a table (11) further comprises the steps of: noting by the computer a floating point register context for all referenced floating point registers (23); and noting by the computer a general purpose register context for all referenced general purpose registers (24).
Claim 7
Independent Claim 109 words
The method of generating efficient object code for a computer as recited in one of claims 1 to 5 wherein the steps of forming the logical OR function and generating new symbolic register numbers (12) further comprise the steps of: testing by the computer each register to determine if it is assigned to an equivalence class (unreferenced block left of 30), and if not, putting that register in a: class by itself (30) and testing by the computer each register to determine if it appears in more than one context (38), and if so, making up new names so that there is a different one for each context (39).
Claim 8
Independent Claim 66 words
The method of generating efficient object code for a computer as recited in one of claims 1 to 6 wherein said step of inserting code (13) further comprises the step of checking by the computer each instruction to determine if it is a move register instruction (44), and if it is, inserting by the computer code to do the move instruction in that register space (45).
Claim 9
Independent Claim 104 words
The method of generating efficient object code for a computer as recited in one of claims 1 to 7 wherein said step of inserting code (13) further comprises the step of checking by the computer each target register to determine if that register appears in more than one context (46), and if so, determining by the computer if the operation can be done efficiently in alternate register spaces (47), and if so, inserting by the computer code to do the operation in the alternate register spaces (48), but otherwise, insert­ing by the computer code to move the result to the alternate register spaces (49).
Claim 10
Independent Claim 73 words
The method of generating efficient object code for a computer as recited in one of claims 1 to 8 wherein said step of inserting code (13) further comprises the steps of testing by the computer each source register to determine if it appears in more than one context (50), and if so, changing by the computer the register to a new name that is in the appropriate space for a corresponding operation (51).

References Cited (Backward Citations)

No citation records indexed.

USPTO Annuity & Maintenance Windows

Maintenance schedule is calculated for granted US utility patents.

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag