Multi-branch determination syntax optimization apparatus
US-9715374-B2 · Jul 25, 2017 · US
US9921813B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-9921813-B2 |
| Application number | US-201314435595-A |
| Country | US |
| Kind code | B2 |
| Filing date | Oct 30, 2013 |
| Priority date | Nov 7, 2012 |
| Publication date | Mar 20, 2018 |
| Grant date | Mar 20, 2018 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
A compiler 134 for compiling a first computer program 110 written in a first computer programming language into a second computer program written in a machine language, the compiler comprises a code generator to generate the second computer program by generating tables 142 and machine language code 144 , the generated tables and the generated machine language code together forming the second computer program, wherein the generated machine language code references the tables and the generated machine language code does not contain arithmetic or logic machine instructions, the tables comprising pre-computed results of arithmetic and/or logic machine instructions.
Opening claim text (preview).
The invention claimed is: 1. A compiler running on a computer for compiling a first computer program stored on a non-transitory computer readable medium and written in a first computer programming language into a second computer program, the compiler running on the computer comprises a code generator to generate the second computer program by generating tables and machine language code, the second computer program consisting of the generated tables and the generated machine language code, the generated machine language code referencing the tables, wherein the compiler is configured to identify an arithmetic or logical expression in the first computer program, the identified expression depending on at least one variable, and the code generator is configured to generate one or more tables representing pre-computed results of the identified expression for multiple values of the at least one variable and to generate machine language code to implement the identified expression in the second computer program by accessing the generated one or more tables representing pre-computed results, wherein the machine language code generated to implement the identified expression does not contain arithmetic machine instructions, wherein the machine language code generated to implement the identified expression is operator free consisting of load and store operations for transferring data between registers and a memory, and unconditional jump operations, and wherein the machine language code generated to implement the identified expression does not contain conditional machine instructions, and wherein the compiler is configured to identify a conditional expression dependent on a conditional in the first computer program, and the code generator is configured to generate one or more pre-computed branch tables for the identified expression for multiple values of the conditional and to generate machine language code to implement the identified expression in the second computer program by accessing the generated one or more branch tables. 2. The compiler as in claim 1 , wherein the load operations are for loading a register with one of: a constant, a value stored at a memory address, and another register; wherein the memory address is indicated by one or more registers and/or constants. 3. The compiler as in claim 1 , wherein the store operations are for storing one or more registers and/or constants at one or more memory addresses, wherein the memory addresses are indicated by one or more registers and/or constants. 4. The compiler as in claim 1 , wherein the jump operations are for jumping to a memory address, wherein the memory address is indicated by one or more registers and/or constants, or memory address is retrieved from a further memory address. 5. The compiler as in claim 1 , wherein the machine language acts on registers, a subset of the registers forming address registers for containing memory addresses. 6. The compiler as in claim 1 , wherein the compiler is configured to identify in the first computer program an expression acting on one or more data items, the code generator being configured to produce machine language code for loading each one of the data items in a respective register of the same address register, loading data in the other registers of the address register so that the address register indicates a table entry, loading a result of the operator acting on the data items from the memory address indicated by the address register into a register. 7. The compiler as in claim 1 , wherein the compiler is configured to identify in the first computer program a conditional jump, the code generator being configured to produce machine code for loading a register holding a value indicative of the conditional jump in a register of an address register, loading data in the other registers of the address register so that the address register indicates a table entry, jumping to the memory address stored in the memory at the memory address indicated by the address register. 8. A computer comprising a compiler for compiling a first computer program stored on a non-transitory computer readable medium and written in a first computer programming language into a second computer program, wherein the compiler comprises: a code generator to generate the second computer program by generating tables and machine language code, the second computer program consisting of the generated tables and the generated machine language code, the generated machine language code referencing the tables, wherein the compiler is configured to identify an arithmetic or logical expression in the first computer program, the identified expression depending on at least one variable, and the code generator is configured to generate one or more tables representing pre-computed results of the identified expression for multiple values of the at least one variable and to generate machine language code to implement the identified expression in the second computer program by accessing the generated one or more tables representing pre-computed results, wherein the machine language code generated to implement the identified expression does not contain arithmetic machine instructions, and wherein the machine language code generated to implement the identified expression is operator free consisting of load and store operations for transferring data between registers and a memory, and unconditional jump operations, and wherein the machine language code generated to implement the identified expression does not contain conditional machine instructions, and wherein the compiler is configured to identify a conditional expression dependent on a conditional in the first computer program, and the code generator is configured to generate one or more pre-computed branch tables for the identified expression for multiple values of the conditional and to generate machine language code to implement the identified expression in the second computer program by accessing the generated one or more branch tables. 9. A compiling method for compiling a first computer program written in a first computer programming language into a second computer program, the method comprising acts of: generating by a compiler of a computer the second computer program by generating tables and machine language code, the second computer program consisting of the generated tables and the generated machine language code, the generated machine language code referencing the tables; and identifying an arithmetic or logical expression in the first computer program, the identified expression depending on at least one variable; and generating one or more tables representing pre-computed results of the identified expression for multiple values of the at least one variable and to generate machine language code to implement the identified expression in the second computer program by accessing the generated one or more tables representing pre-computed results, wherein the machine language code generated to implement the identified expression does not contain arithmetic machine instructions, wherein the machine language code generated to implement the identified expression is operator free consisting of load and store operations for transferring data between registers and a memory, and unconditional jump operations, and wherein the machine language code generated to implement the identified expression does not contain conditional machine instructions, and wherein the compiler is configured to identify a conditional expression dependent on a conditional in the first computer program, and the code generator is configured to generate one or more pre-computed branch tables for the identified expression for multiple values of the conditional and
Related publications grouped by family.
Answers are generated from the same data shown on this page.