Patent ID: 9213548
Filing Date: 2015-12-15
Classification: G06F

Abstract:
1. A non-transitory computer-readable storage medium storing a computer program for generating, from a first code, a specific instruction that performs a same type of operation on different data in parallel by combining two or more instructions included in the first code, and generating a second code including the specific instruction, the computer program causing a computer to perform a procedure comprising: generating first and second trees representing a dependency relationship among instructions from the first code, the second tree being shorter in height than the first tree; deforming the first and second trees with first and second deformations, the first deformation equalizing the first and second trees in height by inserting pseudo instructions to the second tree that is shorter than the first tree, the pseudo instructions causing no difference in data before and after operation, the second deformation sorting instructions existing at a same depth from a root according to operation types specified by the instructions in one or both of the first and second trees; and comparing the first and second trees subjected to the adjusting of the height and the sorting of instructions with each other to determine combinations of an instruction of the first tree and an instruction of the second tree, wherein the first deformation includes: inserting the pseudo instructions to the second tree as a trial; calculating a single-instruction multiple-data (SIMD) ratio representing a ratio of instructions to be converted to SIMD instructions to all the instructions included in the second tree; repeating the inserting the pseudo instructions as a trial and the calculating a SIMD ratio for each different combination of positions in the second tree at which the pseudo instructions can be inserted; selecting one of the combinations of positions for the pseudo instructions with which the calculating yields a greatest SIMD ratio; and inserting the pseudo instructions to the selected combination of positions in the second tree.