Compile apparatus, compile method and computer-readable...

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S152000, C717S152000

Reexamination Certificate

active

06256782

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates to a compile apparatus that compiles a source program and generates an object program, and particularly to a compile apparatus and a compiler which compile a source program, which generates a number of specific mask instructions when compiled, to generate an object program whose execution efficiency is improved and whose size is small.
2. Description of the Related Art
By generating an object program which uses as much data space as is available in a register, a compiler can enhance the execution efficiency of that object program and also can reduce the code size.
However, in the actual compile environment, there are cases where the data width prescribed by a programming language is shorter than the width of a hardware register. In the case where a source program written in such a programming language uses a variable of the short data type, it is necessary that a compiler sets operations invalidating the excess bits from the data width on the register, in the object program. In such case, a conventional compiler makes the excess bits from the data width on the register all zero, by generating bit conjunction instructions (hereinafter referred to as a mask instruction), where a value (hereinafter referred to as a mask value), in which specific bits are all unity is used and where bits other than specific bits of a value (which becomes an object of arithmetic operation) are made all zero.
Incidentally, it is easily predictable that a number of mask values and mask instructions appear in the generated object program, depending upon hardware which runs the object program and the language of the source program.
In the aforementioned conventional compiler, however, when a source program generating a number of mask values and mask instructions, as described above, is compiled, there is the need to set an instruction to set a mask value to a register every time a mask value appears. Therefore, in a function whose entire size is small, there is the problem that setting and executing this instruction is turned into overhead time to be reckoned with, and consequently, the problem that there are cases where the execution efficiency of the object program is reduced.
SUMMARY OF THE INVENTION
The present invention has been made to solve the above-described problem, and therefore, has an object to provide a compile apparatus, compile method and computer readable medium storing a compiler which generate an object program whose execution efficiency is better.
Furthermore, the present invention has another object to generate an object program whose size is small, by acquiring a dedicated register and minimizing generation of instructions to set a mask value to the register, with an explicit indication given by the user at the time of compilation in the case where it is predictable that a number of the same mask values are used.
A first compile apparatus in accordance with the present invention, comprises:
code generation means for inputting a source program and generating code of an object program, where a preacquired mask value-only register is used in a mask instruction; and
mask value setting instruction insertion means for inserting an instruction to set a mask value to said pre-acquired mask value-only register into said code generated by said code generation means.
In a second compile apparatus in accordance with the present invention, said code generation means in the first compile apparatus in accordance with the present invention performs syntax analysis and optimization processing.
In a third compile apparatus in accordance with the present invention, said code generation means in the first compile apparatus in accordance with the present invention generates code wherein variable data and constant data are allocated to registers other than said preacquired mask value-only register, in instructions other than said mask instruction.
In a fourth compile apparatus in accordance the present invention, said code generation means in the third compile apparatus in accordance with the present invention performs syntax analysis and optimization processing.
A fifth compile apparatus in accordance with the present invention, comprises:
mask value-only register acquisition means for acquiring a dedicated mask value-only register for use in a mask instruction;
code generation means for inputting a source program and generating code of an object program, where said mask value-only register acquired by said mask value-only register acquisition means is used in said mask instruction; and
mask value setting instruction insertion means for inserting an instruction to set a mask value to said mask value-only register acquired by said mask value-only register acquisition means into said code generated by said code generation means.
In a sixth compile apparatus in accordance with the present invention, said code generation means in the fifth compile apparatus in accordance with the present invention performs syntax analysis and optimization processing.
In a seventh compile apparatus in accordance with the present invention, said code generation means in the fifth compile apparatus in accordance with the present invention generates code wherein variable data and constant data are allocated to registers other than said mask value-only register acquired by said mask value-only register acquisition means, in instructions other than said mask instruction.
In an eighth compile apparatus in accordance with the present invention, said code generation means in the seventh compile apparatus in accordance with the present invention performs syntax analysis and optimization processing.
A ninth compile apparatus in accordance with the present invention, comprises:
code generation method selection means for inputting a user's indication that a mask value-only register is acquired only for use in a mask instruction;
mask value-only register acquisition means for acquiring said mask value-only register for use in a mask instruction, when said code generation method selection means inputs the indication that a mask value-only register is to be acquired;
code generation means for inputting a source program and generating code of an object program, where said mask value-only register acquired by said mask value-only register acquisition means is used in said mask instruction; and
mask value setting instruction insertion means for inserting an instruction to set a mask value to said mask value-only register acquired by said mask value-only register acquisition means into said code generated by said code generation means.
In a tenth compile apparatus in accordance with the present invention, said code generation means in the ninth compile apparatus in accordance with the present invention performs syntax analysis and optimization processing.
In an eleventh compile apparatus in accordance with the present invention, said code generation means in the ninth compile apparatus in accordance with the present invention generates code wherein variable data and constant data are allocated to registers other than said mask value-only register acquired by said mask value-only register acquisition means, in instructions other than said mask instruction.
In a twelfth compile apparatus in accordance with the present invention, said code generation means in the eleventh compile apparatus in accordance with the present invention performs syntax analysis and optimization processing.
A first computer-implemented method of compiling in accordance with the present invention, comprises:
a first step of inputting a source program;
a second step of generating code of an object program, where a preacquired mask value-only register is used in a mask instruction; and
a third step of inserting an instruction to set a mask value to said preacquired mask value-only register into said code generated in said second step.
In a second method of compiling in accordance with the present invention, the first method of compiling in accordance with the present invention furthe

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Compile apparatus, compile method and computer-readable... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Compile apparatus, compile method and computer-readable..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Compile apparatus, compile method and computer-readable... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2547370

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.