Method and apparatus for code optimization
First Claim
Patent Images
1. A system, comprising:
- a processor; and
a compiler configured to execute on the processor to compile Java source code for execution on the processor, wherein the compiler generates a sing intermediate instruction optimizable to a single native instruction at runtime and replaces the single intermediate instruction with a single native rewrite instruction comprising a rewrite operation code,wherein execution of the single native rewrite instruction by the processor rewrites the single native rewrite instruction into the single native instruction, andwherein the single intermediate instruction comprises an operation code of a first instruction set type of the processor, and the single native rewrite instruction is an instruction in a second instruction set type of the processor.
1 Assignment
0 Petitions
Accused Products
Abstract
A system comprising a compiler that compiles source-level code to generate an intermediate-level instruction comprising a predetermined component. The intermediate-level instruction is an at least partially optimized version of the source-level code. Execution of the predetermined component triggers the execution of a series of instructions that, when executed, generates previously-unavailable data that is used to re-generate the intermediate-level instruction. The re-generated intermediate-level instruction has a length less than or equal to that of the intermediate-level instruction.
-
Citations
19 Claims
-
1. A system, comprising:
-
a processor; and a compiler configured to execute on the processor to compile Java source code for execution on the processor, wherein the compiler generates a sing intermediate instruction optimizable to a single native instruction at runtime and replaces the single intermediate instruction with a single native rewrite instruction comprising a rewrite operation code, wherein execution of the single native rewrite instruction by the processor rewrites the single native rewrite instruction into the single native instruction, and wherein the single intermediate instruction comprises an operation code of a first instruction set type of the processor, and the single native rewrite instruction is an instruction in a second instruction set type of the processor. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A processor, comprising:
-
a fetch logic configured to fetch from storage compiled Java code comprising a single native rewrite instruction that replaced a single intermediate instruction optimizable to a single native instruction at runtime during compilation, wherein the single native rewrite instruction comprises a rewrite operation code; a decade logic coupled to the fetch logic and configured to decode the compiled code, wherein, upon decoding the rewrite operation code, the decode logic causes execution of the single native rewrite instruction by the processor to rewrite the single native rewrite instruction into the single native instruction, and wherein, the single intermediate instruction comprises an operation code of a first instruction set type of the processor, and the single native rewrite instruction is an instruction in a second instruction set type of the processor. - View Dependent Claims (9, 10, 11, 12)
-
-
13. A computer-implemented method, comprising:
-
compiling source-level Java code to generate a single intermediate instruction, wherein the single intermediate instruction is optimizable to a single native instruction at runtime; and replacing the single intermediate instruction with a single native rewrite instruction comprising a rewrite operation code, wherein execution of the single native rewrite instruction by a processor rewrites the single native rewrite instruction into the single native instruction, and wherein the single intermediate instruction comprises an operation code of a first instruction set type of the processor, and the single native rewrite instruction is an instruction in a second instruction set type of the processor. - View Dependent Claims (14, 15)
-
-
16. A computer-implemented method, comprising:
- decoding a single native rewrite instruction comprised in compiled Java code, wherein the single native rewrite instruction comprises a rewrite operation code and wherein, during compilation, the single native rewrite instruction replaced a single intermediate instruction optimizable to a single native instruction at runtime; and
responsive to the decoding, executing the single native rewrite instruction on a processor to rewrite the single native rewrite instruction into the single native instruction, wherein the single intermediate instruction comprises an operation code of a first instruction set type of the processor, and the single native rewrite instruction is an instruction in a second instruction set type of the processor. - View Dependent Claims (17, 18, 19)
- decoding a single native rewrite instruction comprised in compiled Java code, wherein the single native rewrite instruction comprises a rewrite operation code and wherein, during compilation, the single native rewrite instruction replaced a single intermediate instruction optimizable to a single native instruction at runtime; and
Specification