An improved method, apparatus, and computer instructions for generating
instructions to process multiple similar expressions. Parameters are
identified for the expressions in the original instructions, to form a
set of identified parameters typically including the operations
performed, the types of data used, and the data sizes. Each type of
execution unit that can execute the instructions needed to process the
expressions using the set of identified parameters is identified, wherein
a set of identified execution unit types is formed. An execution unit
type from the set of identified execution unit types is selected to meet
a performance goal. The new instructions are generated for the selected
execution unit type to process the expressions, and the original
instructions for the expressions are discarded.