Patent ID: 8201159

Claim:
A method of compiling program code, the method comprising: receiving, by a compiler, an instruction stream including a plurality of instructions that form the program code, the instructions being related to both scalar and vector data; forming, by the compiler, hyperblocks from the instruction stream thus providing an instruction stream with hyperblocks; injecting, by the compiler, data parallel select instructions into the instruction stream with hyperblocks to form a modified instruction stream wherein conditional test and branch instructions are replaced with data parallel select instructions; revising, by the compiler, the modified instruction stream to enhance execution of the data parallel select instructions by performing select promotion operations on the modified instruction stream, thus providing a revised modified instruction stream; wherein performing select promotion operations includes: identifying a program sequence in the modified instruction stream wherein a select operation is associated with two selection sources corresponding to two operations of the same type, the two selection sources including input operands, the select operation yielding a result computation; and replacing the result computation of the select operation with at least one other select operation corresponding to a selection of at least one of the input operands, the output of the at least one other select operation feeding another operation of the same type; and generating, by the compiler, vectorized code from the revised modified instruction stream.