Method for improved code generation in reduced instruction set computers
First Claim
1. A method, for use by a compiler program running on a computer, for efficient generation of compiled code, the method comprising the steps of:
- (c) creating out-of-line code sequences, a first portion of the out-of-line code sequences being general purpose out-of-line code sequences which completely perform operations and a second portion of the out-of-line code sequences being specific purpose out-of-line code sequences each of which implements a segment of an operation, each of the implemented segments used in the generation of code for more than one operation;
(b) determining by the compiler program whether at compile time there is available to the compiler program information about a first operation which may be used to at least partially perform the first operation;
(c) if information about the first operation which may be used to at least partially perform the first operation is not available to the compiler program,determining by the compiler program whether code for the first operation can be generated using less than a predetermined number of instructions, andgenerating code by the compiler program which when executed by a computer will perform the first operation in line if code for the first operation can be generated using less than the predetermined number of instructions, otherwise generating code which calls a general purpose out-of-line code sequence which when executed will perform the first operation; and
(d) if information about the first operation which may be used to at least partially perform the first operation is available to the compiler program and the compiler program determines the first operation can be fully described by information available to the compiler program at compile time, generating code by the compiler program which when executed will perform the first operation so that for every segment of the first operation which the compiler program determines is implemented by one of the specific purpose out-of-line code sequences a specific purpose out-of-line code sequence which implements the segment of the first operation is called and so that for every segment of the first operation which the compiler program determines is not implemented by one of the specific purpose out-of-line code sequences, code which implements the segment is placed in-line.
2 Assignments
0 Petitions
Accused Products
Abstract
A method for efficient generation of complied code is presented. In order to gain significant performance advantage with a minimum of code expansion, out-of-line code sequences are used. An out-of-line code sequence is a series of instructions that are invoked by a simplified calling mechanism in which almost no state-saving is required. Additionally, out-of-line code sequences is designed so that a single copy can exist on a system and all processes running on that system can access it. A series of out-of-line code sequences can be generated, each member of the series being tailored to a particular combination of compile-time information.
72 Citations
2 Claims
-
1. A method, for use by a compiler program running on a computer, for efficient generation of compiled code, the method comprising the steps of:
-
(c) creating out-of-line code sequences, a first portion of the out-of-line code sequences being general purpose out-of-line code sequences which completely perform operations and a second portion of the out-of-line code sequences being specific purpose out-of-line code sequences each of which implements a segment of an operation, each of the implemented segments used in the generation of code for more than one operation; (b) determining by the compiler program whether at compile time there is available to the compiler program information about a first operation which may be used to at least partially perform the first operation; (c) if information about the first operation which may be used to at least partially perform the first operation is not available to the compiler program, determining by the compiler program whether code for the first operation can be generated using less than a predetermined number of instructions, and generating code by the compiler program which when executed by a computer will perform the first operation in line if code for the first operation can be generated using less than the predetermined number of instructions, otherwise generating code which calls a general purpose out-of-line code sequence which when executed will perform the first operation; and (d) if information about the first operation which may be used to at least partially perform the first operation is available to the compiler program and the compiler program determines the first operation can be fully described by information available to the compiler program at compile time, generating code by the compiler program which when executed will perform the first operation so that for every segment of the first operation which the compiler program determines is implemented by one of the specific purpose out-of-line code sequences a specific purpose out-of-line code sequence which implements the segment of the first operation is called and so that for every segment of the first operation which the compiler program determines is not implemented by one of the specific purpose out-of-line code sequences, code which implements the segment is placed in-line. - View Dependent Claims (2)
-
Specification